From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sat, 5 Nov 2005 21:51:52 +0100 From: Georg Neis To: 9fans@cse.psu.edu Message-ID: <20051105205152.GA28109@oglaroon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.9i Subject: [9fans] Acme and the pipe command Topicbox-Message-UUID: a680740e-ead0-11e9-9d60-3106f5b1d025 Acme's man page says about Edit: Treat the argument as a text editing command in the style of sam(1). The full Sam language is implemented except for the commands k, n, q, and !. However, it seems that sam's pipe command doesn't work. For example, Edit ,|sort removes all lines instead of sorting them. Thanks to Uriel I now know that acme has its own | command. But why this exception? It's even undocumented. Regards, Georg From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <82c890d00511051304n65880b9bq@mail.gmail.com> Date: Sat, 5 Nov 2005 21:04:39 +0000 From: Gabriel Diaz To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Acme and the pipe command In-Reply-To: <20051105205152.GA28109@oglaroon.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_24328_31356042.1131224679644" References: <20051105205152.GA28109@oglaroon.de> Topicbox-Message-UUID: a686982a-ead0-11e9-9d60-3106f5b1d025 ------=_Part_24328_31356042.1131224679644 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi It works for me. If i put a number on each line and then Edit ,|sort -n i get numbers sorted= . (you need to have the last line with a \n to avoid an error message from sort) Gabi 2005/11/5, Georg Neis : > > Acme's man page says about Edit: > Treat the argument as a text editing command in the style of sam(1). > The full Sam language is implemented except for the commands k, n, q, > and !. > > However, it seems that sam's pipe command doesn't work. For example, > Edit ,|sort > removes all lines instead of sorting them. > > Thanks to Uriel I now know that acme has its own | command. But why this > exception? It's even undocumented. > > Regards, > Georg > ------=_Part_24328_31356042.1131224679644 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi

It works for me.

If i put a number on each line and then Edit ,|sort -n i get numbers sorted= .
(you need to have the last line with a  \n to avoid an error message f= rom sort)

Gabi


2005/11/5, Georg Neis <gn@oglaroon.de>:
Acme's man page says about Edit:
    Treat the argum= ent as a text editing command in the style of sam(1).
   =  The full Sam language is implemented except for the commands k, n, q,=
    and !.

However, it seems that sam's pipe= command doesn't work.  For example,
    Edit ,|sort
removes all lines instead of sor= ting them.

Thanks to Uriel I now know that acme has its own | comman= d.  But why this
exception?  It's even undocumented.=

Regards,
Georg

------=_Part_24328_31356042.1131224679644-- From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <7359f0490511051321o7070091fy7c5df589e8c676c4@mail.gmail.com> Date: Sun, 6 Nov 2005 08:21:35 +1100 From: Rob Pike To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Acme and the pipe command In-Reply-To: <20051105205152.GA28109@oglaroon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051105205152.GA28109@oglaroon.de> Topicbox-Message-UUID: a68ab676-ead0-11e9-9d60-3106f5b1d025 if the command fails for whatever reason (perhaps sort isn't in your path), then the output will be empty and the command will delete all the text. a message will appear in the +Errors window and you can undo to recover the text and figure out what went wrong. but | is implemented, i assure you. -rob From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sat, 5 Nov 2005 21:58:28 -0500 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Acme and the pipe command In-Reply-To: <20051105205152.GA28109@oglaroon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051105205152.GA28109@oglaroon.de> Topicbox-Message-UUID: a6a2920a-ead0-11e9-9d60-3106f5b1d025 > Edit ,|sort > removes all lines instead of sorting them. This is true of the plan9port version, for reasons I've never tracked down. They have something to do with the fact that, because of the way fsopenfd is implemented, the command can exit before the output has been received by acme. I'm not sure why Edit | doesn't work but regular | does. On Plan 9, they both work fine. > Thanks to Uriel I now know that acme has its own | command. But why this > exception? It's even undocumented. I am surprised, but you seem to be right that the |, <, and > commands in acme are undocumented. (> is like pipe but the output goes to +Errors instead of replacing the selection. < replaces the selection but does not send it to the command.) These predate Edit by many years. Russ From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 6 Nov 2005 11:39:02 +0100 From: Georg Neis To: 9fans@cse.psu.edu Subject: Re: [9fans] Acme and the pipe command Message-ID: <20051106103902.GA22584@oglaroon.de> References: <20051105205152.GA28109@oglaroon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051105205152.GA28109@oglaroon.de> User-Agent: Mutt/1.5.9i Topicbox-Message-UUID: a6f6f82c-ead0-11e9-9d60-3106f5b1d025 Thanks so much for all the replies. I'm sorry for not having mentioned that I'm using plan9port's acme. Btw: there's an invalid entry "acme.1" on http://plan9.bell-labs.com/sys/man/1/INDEX.html Regards, Georg From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Sun, 6 Nov 2005 09:45:32 -0500 From: Russ Cox To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Subject: Re: [9fans] Acme and the pipe command In-Reply-To: <20051106103902.GA22584@oglaroon.de> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20051105205152.GA28109@oglaroon.de> <20051106103902.GA22584@oglaroon.de> Topicbox-Message-UUID: a70b5f7e-ead0-11e9-9d60-3106f5b1d025 Fixed, thanks. On 11/6/05, Georg Neis wrote: > Thanks so much for all the replies. I'm sorry for not having mentioned > that I'm using plan9port's acme. > > Btw: there's an invalid entry "acme.1" on > http://plan9.bell-labs.com/sys/man/1/INDEX.html > > Regards, > Georg >