9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] acme executing |command from a guide file
@ 2007-01-26  6:30 kvchokw02
  2007-01-27 21:24 ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: kvchokw02 @ 2007-01-26  6:30 UTC (permalink / raw)
  To: 9fans

If I type |command in the tag of an acme window, select some text in the window, and B2 on |command, it runs command, sending the selection to stdin and replacing the section with whatever command writes to stdout.  However, if I put |command in a guide file, I haven't been able to figure out how to get selecting text in some other window and B2ing on |command in the guide file to operation on the selection in the other window.  I couldn't find anything at all about |command (or >command or <command) in the acme man page, the acme paper, or in the wiki.  Is there some way to do this?

I'm desperate since |indent and |outdent  are my two most heavily used code formatting tools.

    thanks,
    vbnut

PS: I'm not sure how I even knew about the |, >, and < features in acme since I can't find any documentation about them.  I guess its because I'm transitioning from wily to acme in P9P, but I thought all the cool features in wily came from acme.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] acme executing |command from a guide file
  2007-01-26  6:30 [9fans] acme executing |command from a guide file kvchokw02
@ 2007-01-27 21:24 ` Russ Cox
  2007-01-28  1:23   ` Martin Neubauer
  0 siblings, 1 reply; 4+ messages in thread
From: Russ Cox @ 2007-01-27 21:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> If I type |command in the tag of an acme window, select some
> text in the window, and B2 on |command, it runs command,
> sending the selection to stdin and replacing the section
> with whatever command writes to stdout.  However, if I put
> |command in a guide file, I haven't been able to figure out
> how to get selecting text in some other window and B2ing on
> |command in the guide file to operation on the selection in
> the other window.  I couldn't find anything at all about
> |command (or >command or <command) in the acme man page, the
> acme paper, or in the wiki.  Is there some way to do this?
>
> I'm desperate since |indent and |outdent are my two most
> heavily used code formatting tools.

You can't put the |command in a guide file, but you can put it in
the column tag (the one that reads "New Cut Paste Snarf ...")
or in the top tag (the one that reads "Newcol Kill Putall Dump")
and execute it when the desired window is current
(is the last one you clicked on in that column or in the whole
display, respectively).

> PS: I'm not sure how I even knew about the |, >, and <
> features in acme since I can't find any documentation about
> them.  I guess its because I'm transitioning from wily to
> acme in P9P, but I thought all the cool features in wily
> came from acme.

This is now fixed (thanks to Rob).

Russ


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] acme executing |command from a guide file
  2007-01-27 21:24 ` Russ Cox
@ 2007-01-28  1:23   ` Martin Neubauer
  2007-01-28 10:54     ` Francisco J Ballesteros
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Neubauer @ 2007-01-28  1:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

* Russ Cox (rsc@swtch.com) wrote:
> You can't put the |command in a guide file, but you can put it in
> the column tag (the one that reads "New Cut Paste Snarf ...")
> or in the top tag (the one that reads "Newcol Kill Putall Dump")
> and execute it when the desired window is current
> (is the last one you clicked on in that column or in the whole
> display, respectively).

Wouldn't it be possible to put the ``|command etc...'' in a guide file, with
a subsequent 2-1 chord on the Edit command in the tag line? It seems more
like what was asked (though, personally, I usually use the tagline myself).

	Martin



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [9fans] acme executing |command from a guide file
  2007-01-28  1:23   ` Martin Neubauer
@ 2007-01-28 10:54     ` Francisco J Ballesteros
  0 siblings, 0 replies; 4+ messages in thread
From: Francisco J Ballesteros @ 2007-01-28 10:54 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

In omero we can put |blah at any panel, no matter the machine, and
apply the command to any selection made at any other place.

In practice, 95% of the times I write |blah in the tag lines, nothing acme
can't do. Only for rare cases, i.e., very long commands, I use a
different panel. I wouldn´t mind creating, say, /tmp/blah with a temporary
script and using |/tmp/blah instead.

I thought this comment about our experience of use for such beast still
applies here.

hth

On 1/28/07, Martin Neubauer <m.ne@gmx.net> wrote:
> * Russ Cox (rsc@swtch.com) wrote:
> > You can't put the |command in a guide file, but you can put it in
> > the column tag (the one that reads "New Cut Paste Snarf ...")
> > or in the top tag (the one that reads "Newcol Kill Putall Dump")
> > and execute it when the desired window is current
> > (is the last one you clicked on in that column or in the whole
> > display, respectively).
>
> Wouldn't it be possible to put the ``|command etc...'' in a guide file, with
> a subsequent 2-1 chord on the Edit command in the tag line? It seems more
> like what was asked (though, personally, I usually use the tagline myself).
>
>         Martin
>
>
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-01-28 10:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-26  6:30 [9fans] acme executing |command from a guide file kvchokw02
2007-01-27 21:24 ` Russ Cox
2007-01-28  1:23   ` Martin Neubauer
2007-01-28 10:54     ` Francisco J Ballesteros

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).