On Mon, Jul 27, 2009 at 11:06 AM, Tim Newsham<news...@lava.net> wrote: >> Is there some idiom or method for using Acme as an external editor to some >> other program? Say I want to use it as the editor that is spawned when I do >> a CVS commit to a system; how would I do this, or can this even be done? I'm >> using plan9ports, but I don't know how much of this question relates to >> what. > > I was playing with this exact problem recently. There's an easy way to send > a file to acme for editing -- the plumber. There's a downside, it doesn't > wait for the editor to save or complete. So.. you could plumb the file and > then wait for a save to happen, somehow, or you can write another program > that forces a new acme window with the contents of the file and waits for it > to either Put or Del. I wrote a small program to do this recently (see the > thread: http://9fans.net/archive/2009/06/290) which was a bit hacky, but > worked. I solicited some feedback on some questions and got some good > advice from Russ (http://9fans.net/archive/2009/06/292) but havent yet gone > back and applied it.
I don't think you need to be that fancy. Lorenzo Bolla already pointed out E in this thread, and it exists exactly for this purpose. http://swtch.com/plan9port/man/man1/sam.html (description of E is at the end) Russ