Re: Posix implementation of Plan 9 cpu(1) (Was: [9fans] Command to set samterm label)

2021-07-20 Thread Lucio De Re
On 7/19/21, Steve Simon wrote: > > my cpu for windows was always incomplete, but good enough that i never > finished it properly. > It's on contrib, is it not? I'll take a peek, if my haphazard priority list allows it :-) > for posix i just use sftpfs or now cinap’s sshftp to import the

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Lucio De Re
On 7/21/21, adr via 9fans <9fans@9fans.net> wrote: >> You'll need to reinvent (or change, at least) plumbing if you want >> multiple editors, be it one >> per file or one per project. > > I'll make sam create allways the named pipe with the pid in the > name so I can identify wich one I want to

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread adr via 9fans
You'll need to reinvent (or change, at least) plumbing if you want multiple editors, be it one per file or one per project. I'll make sam create allways the named pipe with the pid in the name so I can identify wich one I want to talk with. There are a lot of possibilities.

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread ori
Quoth Stuart Morrow : > You'll need to reinvent (or change, at least) plumbing if you want > multiple editors, be it one > per file or one per project. You can also run a nested plumber in a subrio, which is what I do for work -- I open a rio with a plumber that has work-specific rules, along

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Stuart Morrow
> Have you seen ptrap(4) in 9front? Yes, Ori mentioned it in 0intro, the Plan 9 podcast -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tc809ad6007ccd2bd-M9582240260310aa609582fc5 Delivery options:

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Ethan Gardener
On Tue, Jul 20, 2021, at 10:27 PM, Stuart Morrow wrote: > You'll need to reinvent (or change, at least) plumbing if you want > multiple editors, be it one > per file or one per project. I used to use one plumber per project window, where a project window was either an instance of acme or a

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Peter Mikkelsen
Have you seen ptrap(4) in 9front? tir. 20. jul. 2021 23.30 skrev Stuart Morrow : > You'll need to reinvent (or change, at least) plumbing if you want > multiple editors, be it one > per file or one per project. -- 9fans: 9fans Permalink:

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread adr via 9fans
On Tue, 20 Jul 2021, adr via 9fans wrote: buffer. I can't identify the file I'm editing using winwatch or the menu when hidden, and so on. Oh my... is "I can identify..." and I wanted to make things clear... -- 9fans: 9fans Permalink:

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Stuart Morrow
You'll need to reinvent (or change, at least) plumbing if you want multiple editors, be it one per file or one per project. -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Tc809ad6007ccd2bd-Mfc05d179050f78c209653739 Delivery options:

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread adr via 9fans
I don't want to add noise to the list, but it seem that some people are confused about what I'm doing with this. You start in rio to work in some project. You open sam in a big window because all the files will be opened inside. You start opening files and changing the focus using the menu, and

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Skip Tavakkolian
I just realized there was another (earlier) thread on this with similar questions; didn't mean to be badgering you. On Tue, Jul 20, 2021 at 12:23 PM adr via 9fans <9fans@9fans.net> wrote: > > On Tue, 20 Jul 2021, Skip Tavakkolian wrote: > > what problem did this fix for you? > > > > all the

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread adr via 9fans
On Tue, 20 Jul 2021, Skip Tavakkolian wrote: what problem did this fix for you? all the changes seem like bad ideas for general use; e.g. would hiding a sam window show a name other than sam? This is for using different instances of sam... Is not for your "general use". I've explained this

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread revcomninos
Thank you. Those distinctions are very helpful. I agree that thinking in terms of lines is easier to reason about. I am going to have to change some of my thinking and break old habits.  -- 9fans: 9fans Permalink:

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread Silas McCroskey
> I have yet gotten to this usage of "g" after "s". The key difference here is not in the behavior of suffixed 'g', but in how selections are made and operated on in the first place. Ed's "selection" (aka dot, as you can reference it with '.') is always a full, single line. It can *iterate* over

Re: [9fans] sam label and rio snarf buffer

2021-07-20 Thread Skip Tavakkolian
what problem did this fix for you? all the changes seem like bad ideas for general use; e.g. would hiding a sam window show a name other than sam? regarding snarf, couldn't you get what you need by manipulating the namespace with an rc script wrapper? > I changed the last patch so sam wont

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread revcomninos
Thank you for the clarification. This first usage conforms to ed. I am currently working slowly through "A Tutorial for the Sam Command Language"  http://doc.cat-v.org/bell_labs/sam_lang_tutorial/ but I have yet gotten to this usage of "g" after "s". --

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread Silas
In sam, g has two uses - either as a guard or after an s command where all substitutions are made Quoting sam(1) (available at ) after an s command: > If the command is followed by a g, as in >    s/x/y/g, all matches in the range are substituted.

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread revcomninos
I.e. in sam. In ed, g is frequently used at the end of the line.  -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Te7fcdc06a68bb777-M976ef16f9b129d3abeaa2511 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread revcomninos
Thank you all for your responses. They were extremely helpful. The first example, which uses "g" threw me a little because I am not used to "g" at the end of the line. I presume it here means something like, "without changing the value of dot?" -- 9fans:

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread Rob Pike
I would ,x s/.*/echo "&"/ as it seems most direct. The ,x idiom is the thing that turns sam into ed. -rob On Tue, Jul 20, 2021 at 9:18 PM wrote: > or: > > ,x/^/i/echo " > ,x/$/i/" > -- 9fans: 9fans Permalink:

[9fans] sam label and rio snarf buffer

2021-07-20 Thread adr via 9fans
Hi, I changed the last patch so sam wont change the label at startup. I added a new option '-l' to set the label, it's more flexible and doesn't chage the normal behavior. If samriosnarf is in /env, sam will use rio's snarf buffer instead of the internal one. This patch should apply to 9legacy,

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread umbraticus
or: ,x/^/i/echo " ,x/$/i/" -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Te7fcdc06a68bb777-M3a70c9ddc3e626951d6349fb Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread revcomninos
Thank you. I will test this an revert back. -- 9fans: 9fans Permalink: https://9fans.topicbox.com/groups/9fans/Te7fcdc06a68bb777-Mc5bcc7a82cda1c6c53ac3225 Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Re: [9fans] ed regular expressions in sam

2021-07-20 Thread Alex Musolino
> In ed it is trivial to edit either side of a line such as changing > the line, > > I use sam and ed > > to, > > echo "I use sam and ed." > > simply with, > > g/.*/s//echo "&."/ > > I am trying to figure out how to do the same in sam.  ,s/^.*$/echo "&."/g or, perhaps closer to your ed

[9fans] ed regular expressions in sam

2021-07-20 Thread revcomninos
In ed it is trivial to edit either side of a line such as changing the line, I use sam and ed to, echo "I use sam and ed." simply with, g/.*/s//echo "&."/ I am trying to figure out how to do the same in sam.  -- 9fans: 9fans Permalink: