* [9fans] Using Acme as an external Editor
@ 2009-07-27 9:31 Aaron W. Hsu
2009-07-27 9:38 ` Sape Mullender
2009-07-27 18:06 ` Tim Newsham
0 siblings, 2 replies; 11+ messages in thread
From: Aaron W. Hsu @ 2009-07-27 9:31 UTC (permalink / raw)
To: 9fans
Hello,
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.
Aaron W. Hsu
--
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 9:31 [9fans] Using Acme as an external Editor Aaron W. Hsu
@ 2009-07-27 9:38 ` Sape Mullender
2009-07-27 10:47 ` Noah Evans
2009-07-27 18:06 ` Tim Newsham
1 sibling, 1 reply; 11+ messages in thread
From: Sape Mullender @ 2009-07-27 9:38 UTC (permalink / raw)
To: 9fans
Take a look at B, which can be used to send a file
to acme. Also you may want to familiarize yourself with plumb.
> Hello,
>
> 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.
>
> Aaron W. Hsu
>
> --
> Of all tyrannies, a tyranny sincerely exercised for the good of its
> victims may be the most oppressive. -- C. S. Lewis
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 9:38 ` Sape Mullender
@ 2009-07-27 10:47 ` Noah Evans
2009-07-27 10:50 ` Noah Evans
0 siblings, 1 reply; 11+ messages in thread
From: Noah Evans @ 2009-07-27 10:47 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
That doesn't work because B ends after it plumbs the file to acme. CVS
will think that you're done. You need some
On Mon, Jul 27, 2009 at 11:38 AM, Sape
Mullender<sape@plan9.bell-labs.com> wrote:
> Take a look at B, which can be used to send a file
> to acme. Also you may want to familiarize yourself with plumb.
>
>
>> Hello,
>>
>> 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.
>>
>> Aaron W. Hsu
>>
>> --
>> Of all tyrannies, a tyranny sincerely exercised for the good of its
>> victims may be the most oppressive. -- C. S. Lewis
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 10:47 ` Noah Evans
@ 2009-07-27 10:50 ` Noah Evans
2009-07-27 11:16 ` Lorenzo Bolla
0 siblings, 1 reply; 11+ messages in thread
From: Noah Evans @ 2009-07-27 10:50 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
That doesn't work because B ends after it plumbs the file to acme. CVS
will think that you're done. You need something like p9p's ipso.
On Mon, Jul 27, 2009 at 12:47 PM, Noah Evans<noah.evans@gmail.com> wrote:
> That doesn't work because B ends after it plumbs the file to acme. CVS
> will think that you're done. You need some
>
> On Mon, Jul 27, 2009 at 11:38 AM, Sape
> Mullender<sape@plan9.bell-labs.com> wrote:
>> Take a look at B, which can be used to send a file
>> to acme. Also you may want to familiarize yourself with plumb.
>>
>>
>>> Hello,
>>>
>>> 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.
>>>
>>> Aaron W. Hsu
>>>
>>> --
>>> Of all tyrannies, a tyranny sincerely exercised for the good of its
>>> victims may be the most oppressive. -- C. S. Lewis
>>
>>
>>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 10:50 ` Noah Evans
@ 2009-07-27 11:16 ` Lorenzo Bolla
2009-07-27 11:22 ` Steve Simon
0 siblings, 1 reply; 11+ messages in thread
From: Lorenzo Bolla @ 2009-07-27 11:16 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
[-- Attachment #1: Type: text/plain, Size: 1303 bytes --]
E calls B, but sleeps until the file has been modified.
L.
On Mon, Jul 27, 2009 at 11:50 AM, Noah Evans <noah.evans@gmail.com> wrote:
> That doesn't work because B ends after it plumbs the file to acme. CVS
> will think that you're done. You need something like p9p's ipso.
>
> On Mon, Jul 27, 2009 at 12:47 PM, Noah Evans<noah.evans@gmail.com> wrote:
> > That doesn't work because B ends after it plumbs the file to acme. CVS
> > will think that you're done. You need some
> >
> > On Mon, Jul 27, 2009 at 11:38 AM, Sape
> > Mullender<sape@plan9.bell-labs.com> wrote:
> >> Take a look at B, which can be used to send a file
> >> to acme. Also you may want to familiarize yourself with plumb.
> >>
> >>
> >>> Hello,
> >>>
> >>> 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.
> >>>
> >>> Aaron W. Hsu
> >>>
> >>> --
> >>> Of all tyrannies, a tyranny sincerely exercised for the good of its
> >>> victims may be the most oppressive. -- C. S. Lewis
> >>
> >>
> >>
> >
>
>
[-- Attachment #2: Type: text/html, Size: 1989 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 11:16 ` Lorenzo Bolla
@ 2009-07-27 11:22 ` Steve Simon
0 siblings, 0 replies; 11+ messages in thread
From: Steve Simon @ 2009-07-27 11:22 UTC (permalink / raw)
To: 9fans
For what its worth, when I started using CVS on plan9
I trained myself to add a -m 'text' after every cvs ci
command.
I also added a -e false (where false is non-existant)
to my $home/lib/cvsrc so I can still omit the -m and
commit stuff with no log message...
[pauses while the mutters in the back row abate]
if there is nothing useful to say.
-Steve
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 9:31 [9fans] Using Acme as an external Editor Aaron W. Hsu
2009-07-27 9:38 ` Sape Mullender
@ 2009-07-27 18:06 ` Tim Newsham
2009-07-27 18:22 ` Russ Cox
1 sibling, 1 reply; 11+ messages in thread
From: Tim Newsham @ 2009-07-27 18:06 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
> 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.
> Aaron W. Hsu
Tim Newsham
http://www.thenewsh.com/~newsham/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 18:06 ` Tim Newsham
@ 2009-07-27 18:22 ` Russ Cox
2009-07-28 1:19 ` J.R. Mauro
0 siblings, 1 reply; 11+ messages in thread
From: Russ Cox @ 2009-07-27 18:22 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Mon, Jul 27, 2009 at 11:06 AM, Tim Newsham<newsham@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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-27 18:22 ` Russ Cox
@ 2009-07-28 1:19 ` J.R. Mauro
2009-07-28 6:55 ` sqweek
0 siblings, 1 reply; 11+ messages in thread
From: J.R. Mauro @ 2009-07-28 1:19 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Mon, Jul 27, 2009 at 2:22 PM, Russ Cox<rsc@swtch.com> wrote:
> On Mon, Jul 27, 2009 at 11:06 AM, Tim Newsham<newsham@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
>
>
One caveat about E: if you're paranoid like I am and save your file
many times while editing, E will not be terribly friendly until you
train yourself to save only when finished. (This is not a criticism of
E, it is merely a warning to people with my kind of idiosyncrasies)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-28 1:19 ` J.R. Mauro
@ 2009-07-28 6:55 ` sqweek
2009-07-28 22:43 ` J.R. Mauro
0 siblings, 1 reply; 11+ messages in thread
From: sqweek @ 2009-07-28 6:55 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
2009/7/28 J.R. Mauro <jrm8005@gmail.com>:
> One caveat about E: if you're paranoid like I am and save your file
> many times while editing, E will not be terribly friendly until you
> train yourself to save only when finished. (This is not a criticism of
> E, it is merely a warning to people with my kind of idiosyncrasies)
Heh, I do this too. Ended up writing
http://sqweek.dnsdojo.org/plan9/acmeedit which also adds a Cancel
option so you can end the editing session with a non-zero exit (used
by some callers to abort the operation).
-sqweek
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [9fans] Using Acme as an external Editor
2009-07-28 6:55 ` sqweek
@ 2009-07-28 22:43 ` J.R. Mauro
0 siblings, 0 replies; 11+ messages in thread
From: J.R. Mauro @ 2009-07-28 22:43 UTC (permalink / raw)
To: Fans of the OS Plan 9 from Bell Labs
On Tue, Jul 28, 2009 at 2:55 AM, sqweek<sqweek@gmail.com> wrote:
> 2009/7/28 J.R. Mauro <jrm8005@gmail.com>:
>> One caveat about E: if you're paranoid like I am and save your file
>> many times while editing, E will not be terribly friendly until you
>> train yourself to save only when finished. (This is not a criticism of
>> E, it is merely a warning to people with my kind of idiosyncrasies)
>
> Heh, I do this too. Ended up writing
> http://sqweek.dnsdojo.org/plan9/acmeedit which also adds a Cancel
> option so you can end the editing session with a non-zero exit (used
> by some callers to abort the operation).
> -sqweek
>
>
You are a lifesaver.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-07-28 22:43 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-27 9:31 [9fans] Using Acme as an external Editor Aaron W. Hsu
2009-07-27 9:38 ` Sape Mullender
2009-07-27 10:47 ` Noah Evans
2009-07-27 10:50 ` Noah Evans
2009-07-27 11:16 ` Lorenzo Bolla
2009-07-27 11:22 ` Steve Simon
2009-07-27 18:06 ` Tim Newsham
2009-07-27 18:22 ` Russ Cox
2009-07-28 1:19 ` J.R. Mauro
2009-07-28 6:55 ` sqweek
2009-07-28 22:43 ` J.R. Mauro
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).