9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] sam enhancement
@ 2004-02-18  1:07 boyd, rounin
  2004-02-18 15:51 ` Rob Pike
  2004-02-19 10:28 ` Wilhelm B. Kloke
  0 siblings, 2 replies; 6+ messages in thread
From: boyd, rounin @ 2004-02-18  1:07 UTC (permalink / raw)
  To: 9fans

i've been thinking about how too produce simple html
and arbitrary text formatting based on piping the text
through a script.

i think it fits in with the model, i nearly have a first cut
[based on the netlib lunix sam].

the plan is this, on button 2:

    - after Search there's another menu entry (if necessary)
    - selecting/clicking on it runs the last |cmd on the selected text

so, with a few scripts:

    html/i
    html/b
    ...

you can format the text, say:

    C/comment

i coded most of it today (when i wasn't coding FPGA drivers).

i think it's a good idea 'cos it fits the model and uses no built
in programability; it's a small amount of code.

i'm very close to having it coded and after it's been tested
i'll post the rcs diffs.



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

* Re: [9fans] sam enhancement
  2004-02-18  1:07 [9fans] sam enhancement boyd, rounin
@ 2004-02-18 15:51 ` Rob Pike
  2004-02-18 16:42   ` boyd, rounin
  2004-02-19  0:04   ` Geoff Collyer
  2004-02-19 10:28 ` Wilhelm B. Kloke
  1 sibling, 2 replies; 6+ messages in thread
From: Rob Pike @ 2004-02-18 15:51 UTC (permalink / raw)
  To: 9fans

>
>     - after Search there's another menu entry (if necessary)
>     - selecting/clicking on it runs the last |cmd on the selected text

many don't realize that if you type a plain
	|
in the command window in sam, it runs the last pipe command
again.  (it stores only one command, so < | > all share, but it's
a convenience nonetheless.)

-rob



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

* Re: [9fans] sam enhancement
  2004-02-18 15:51 ` Rob Pike
@ 2004-02-18 16:42   ` boyd, rounin
  2004-02-19  0:04   ` Geoff Collyer
  1 sibling, 0 replies; 6+ messages in thread
From: boyd, rounin @ 2004-02-18 16:42 UTC (permalink / raw)
  To: 9fans

> many don't realize that if you type a plain
> |
> in the command window in sam, it runs the last pipe command

didn't know that, but i like to mouse and not swap windows.




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

* Re: [9fans] sam enhancement
  2004-02-18 15:51 ` Rob Pike
  2004-02-18 16:42   ` boyd, rounin
@ 2004-02-19  0:04   ` Geoff Collyer
  1 sibling, 0 replies; 6+ messages in thread
From: Geoff Collyer @ 2004-02-19  0:04 UTC (permalink / raw)
  To: 9fans

I had missed that too, but there it is in sam(1):

          In any of <, >, | or !, if the Plan 9 command is omitted the
          last Plan 9 command (of any type) is substituted.

and similar wording was in the 9th ed. Unix version of sam(1).



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

* Re: [9fans] sam enhancement
  2004-02-18  1:07 [9fans] sam enhancement boyd, rounin
  2004-02-18 15:51 ` Rob Pike
@ 2004-02-19 10:28 ` Wilhelm B. Kloke
  2004-02-20  2:10   ` boyd, rounin
  1 sibling, 1 reply; 6+ messages in thread
From: Wilhelm B. Kloke @ 2004-02-19 10:28 UTC (permalink / raw)
  To: 9fans

In article <032c01c3f5bb$8fc0c2d0$67844051@SOMA>,
boyd, rounin <9fans@cse.psu.edu> wrote:
>i've been thinking about how too produce simple html
>and arbitrary text formatting based on piping the text
>through a script.

Sometimes when I used sam, I had the wish to access the bracketing
structures in (extended) regular expressions. The functionality is there,
as you can MOVE to the pairing bracket. But I did not find how to access
this comfortably (i.e. for use in x commands).

Does anybody think about the implementation for this?

--
Dipl.-Math. Wilhelm Bernhard Kloke
Institut fuer Arbeitsphysiologie an der Universitaet Dortmund
Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-257


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

* Re: [9fans] sam enhancement
  2004-02-19 10:28 ` Wilhelm B. Kloke
@ 2004-02-20  2:10   ` boyd, rounin
  0 siblings, 0 replies; 6+ messages in thread
From: boyd, rounin @ 2004-02-20  2:10 UTC (permalink / raw)
  To: 9fans

i have thought of allowing < and > for generality, but
i'm not sure it's useful, despite the fact that it would
be general.



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

end of thread, other threads:[~2004-02-20  2:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-18  1:07 [9fans] sam enhancement boyd, rounin
2004-02-18 15:51 ` Rob Pike
2004-02-18 16:42   ` boyd, rounin
2004-02-19  0:04   ` Geoff Collyer
2004-02-19 10:28 ` Wilhelm B. Kloke
2004-02-20  2:10   ` boyd, rounin

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