[9fans] acme executing |command from a guide file - Plan9

This is a discussion on [9fans] acme executing |command from a guide file - Plan9 ; 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, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: [9fans] acme executing |command from a guide file

  1. [9fans] acme executing |command from a guide file

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

  2. Re: [9fans] acme executing |command from a guide file

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

  3. Re: [9fans] acme executing |command from a guide file

    * 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


+ Reply to Thread