Re: [9fans] sam and 'here documents' on Unix [WAS: Re: Making multiple changes to dot using sam -d]

2022-05-16 Thread Mart Zirnask
Sorry for the late reply -- great hint, thanks very much. In a perfect world, I would need a solution that also works on Windows (with the ported unix/p9 tools), but I'll probably build the sam9f-unix port by iru- [1] for now. Btw, can anybody point me to the initial ^ and/or _ command patch? In

Re: [9fans] sam and 'here documents' on Unix [WAS: Re: Making multiple changes to dot using sam -d]

2022-05-12 Thread umbraticus
hmm, interesting. ^ is indeed very useful; making it work in sam -d is probably the correct thing to do but here's a quick hack. (9front specific, tho you can probably figure out another way to pretend you typed.) umbraticus ; fn f{echo ,x/red/c/blue >/dev/kbdin} ; sam -d -. a I hired a red

[9fans] sam and 'here documents' on Unix [WAS: Re: Making multiple changes to dot using sam -d]

2022-05-12 Thread Mart Zirnask
A related question: 9front sam has the ^ command, which makes it easy to apply multiple sam commands to the dot from a script, e.g: #!/bin/rc cat << END ,x/red/ c/blue/ ,x/yellow/ c/green/ END How does one accomplish this in oldschool Unix sam -d without the ^ command, and also without using

Re: [9fans] sam and samterm in Go

2021-08-06 Thread revcomninos
On Friday, 6 August 2021, at 2:54 PM, Philip Silva wrote: > Actually there is a separate fork of 9fans.net/go that also runs on Plan 9 > and uses the /dev/draw there! Here it's now all merged together: > https://github.com/psilva261/go Philip Thanks for the information.

Re: [9fans] sam and samterm in Go

2021-08-06 Thread Philip Silva via 9fans
Hi! Actually there is a separate fork of 9fans.net/go that also runs on Plan 9 and uses the /dev/draw there! Here it's now all merged together: https://github.com/psilva261/go Philip > How I can use those sam/samterm on plan9? > > I compiled those, and run sam as > > teerm% sam > > samterm:

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

2021-07-23 Thread umbraticus
> I've to think about the plumber and the the named pipe to be able > to plumb a file and bring to the front a sam instance if it has > the file open, moving the file's window to the front with dot set at > the address, if one is given. I have this: diff -u /sys/src/cmd/samterm/plan9.c ./plan9.c

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

2021-07-23 Thread adr via 9fans
In case someone was playing with this, last patch was really naive (and buggy). I tried different approaches while learning more about how the two parts of the editor interact with each other and after some back-and-forths it's working now. I enabled again the menu item when samriosnarf is

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

2021-07-21 Thread hiro
> Will cooperation come back to rescue this planet, or will it be too > late? I suppose if one omits human exceptionalism, Nature will triumph > by default. But it's going to hurt like hell! works on my 9front -- 9fans: 9fans Permalink:

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

[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] Sam tricks (was: Alternative to fine-grained mouse usage?)

2021-07-01 Thread Silas McCroskey
> often switching files, Sam's menus are practically worse than Acme > The weakest point in sam -d is still switching files, you have to type > whole filenames X/pathregex/b sam will dump a warning about an expected blank, but it'll otherwise do what you hope for (switch to the open file

Re: [9fans] Sam arena allocators

2021-06-29 Thread silas poulson
On 30 Jun 2021, at 00:44, noel.h...@gmail.com wrote: The source file in question is 'gcalloc.c' and it seems to be in sam source as late as 10th Edition. From a perusal of research source, it seems to have been used in jim, sam, pads, mux amongst others. Right, thank

Re: [9fans] Sam arena allocators

2021-06-29 Thread noel . hunt
As Rob Pike pointed out, the compacting garbage collector was used in severalof the programs written for the Blit. The source file in question is 'gcalloc.c' and it seems to be in sam source as late as 10th Edition. >From a perusal of research source, it seems to have been used in jim, sam, pads,

Re: [9fans] Sam arena allocators

2021-06-28 Thread silas poulson
> On 28 Jun 2021, at 23:29, Rob Pike wrote: > After Acme was written, I replaced most of the buffer management code in Sam > with that from Acme, which was more efficient Right, that makes sense. > It's possible the old code used an arena allocator, I don't remember, > but it's possible you're

Re: [9fans] Sam arena allocators

2021-06-28 Thread Rob Pike
After Acme was written, I replaced most of the buffer management code in Sam with that from Acme, which was more efficient - it did the database stuff in a different order that was one pass quicker. It's possible the old code used an arena allocator, I don't remember, but it's possible you're

[9fans] Sam arena allocators

2021-06-28 Thread silas poulson
Hi, Recently discovered a blog post[1] stating Sam used to have arena based allocators. Having difficulty finding more about this - does anyone know what the allocator looked like and why the source returned to using the standard allocators. Silas

Re: [9fans] sam -d for DOS (FreeDOS)?

2021-06-17 Thread Steve Simon
I do think I build the backend of sam on MSDOS back in the day, it was most probably the 1st edition plan9 code which was released as a seperate package (with X11 libraries). (still kicking around on netlib: http://www.netlib.org/research/) It require some porting effort but I am pretty sure I

[9fans] sam -d for DOS (FreeDOS)?

2021-06-17 Thread Mart Zirnask
Hello, Has there ever been a port of sam -d for DOS? I tried the win32 port (pf9) on FreeDOS, but it didn't work. btw this link on sam's homepage (pf9 for 64-bit Windows) is dead: https://bitbucket.org/mtrS/pf9 Thanks and best, Mart -- 9fans: 9fans

Re: [9fans] sam and samterm in Go

2021-04-22 Thread kokamoto
> just published 9fans.net/go/cmd/sam and 9fans.net/go/cmd/samterm. They > seem to work well enough for simple use but I haven't really hammered > hard on them. Samterm requires the plan9port devdraw, for now. How I can use those sam/samterm on plan9? I compiled those, and run sam as teerm% sam

Re: [9fans] sam and samterm in Go

2021-04-17 Thread Maurizio Boriani
Russ Cox writes: > I have been playing off and on with converting some of the Plan 9 > tools from C to Go, for both better portability and better > maintainability. It's amazing ;-) I'm playing with porting refer[1] (I need it) to Go, Forsyth version. > I just published 9fans.net/go/cmd/sam

[9fans] sam and samterm in Go

2021-04-16 Thread Russ Cox
Hi all, I have been playing off and on with converting some of the Plan 9 tools from C to Go, for both better portability and better maintainability. I just published 9fans.net/go/cmd/sam and 9fans.net/go/cmd/samterm. They seem to work well enough for simple use but I haven't really hammered hard

[9fans] Sam/Acme commands and idioms in ASCII/Markdown

2015-07-15 Thread Anssi Porttikivi
I converted A Sam Commands Reference Card by Steve Simon http://sam.cat-v.org/cheatsheet/ to Markdown ASCII format for myself to use in Acme-sac. Could be just raw ASCII of course. sam-editor-commands-and-idioms.md http://pastebin.com/wX1f0ExG -- mailto:a...@iki.fi

Re: [9fans] Sam/Acme commands and idioms in ASCII/Markdown

2015-07-15 Thread Anssi Porttikivi
Well, I spent 15 minutes ;-) keskiviikko 15. heinäkuuta 2015 st...@quintile.net st...@quintile.net kirjoitti: hope you didn't spend long on it, the source is here: http://quintile.net/papers/sam-refcard.tbl if you want to reformat it. some times I think this refcard is all I will be

Re: [9fans] Sam/Acme commands and idioms in ASCII/Markdown

2015-07-15 Thread st...@quintile.net
hope you didn't spend long on it, the source is here: http://quintile.net/papers/sam-refcard.tbl if you want to reformat it. some times I think this refcard is all I will be remembered for - better than nothing I guess. -Steve On 15 Jul 2015, at 09:27, Anssi Porttikivi

Re: [9fans] Sam/Acme commands and idioms in ASCII/Markdown

2015-07-15 Thread st...@quintile.net
it would be more helpful if you submitted fixes to the appropriate author if you find mistakes. I wrote the original document based on sam(1), Sam-tut.ms, and the musings of the sam-fans list. it collates info which was hard won at the time. sam's language is so expressive few people

Re: [9fans] Sam/Acme commands and idioms in ASCII/Markdown

2015-07-15 Thread Antons Suspans
Tr, 07/15/2015 11:27 AM Anssi Porttikivi porttik...@gmail.com rakstīja: I converted A Sam Commands Reference Card by Steve Simon http://sam.cat-v.org/cheatsheet/ to Markdown ASCII format for myself to use in Acme-sac. Could be just raw ASCII of course.

Re: [9fans] sam for Windows?

2014-12-21 Thread yy
On 3 June 2014 at 00:08, Steve Simon st...@quintile.net wrote: there is the pf9 package which would probably be the best starting point. https://bitbucket.org/knieriem/pf9 It looks like the repository is not there anymore. Does anybody keep a copy of those binary files I could download?

Re: [9fans] sam for Windows?

2014-12-21 Thread Skip Tavakkolian
i've not tired it, but there's a copy here: https://bitbucket.org/mtrS/pf9 On Sun Dec 21 2014 at 10:24:16 AM yy yiyu@gmail.com wrote: On 3 June 2014 at 00:08, Steve Simon st...@quintile.net wrote: there is the pf9 package which would probably be the best starting point.

Re: [9fans] sam for Windows?

2014-08-27 Thread Russ Cox
On Fri, Jul 18, 2014 at 7:13 PM, 6o205z...@sneakemail.com wrote: There are 5 downloads at https://bitbucket.org/knieriem/pf9/downloads. Which one(s) did you use? Sorry, I missed this mail when it came in. I used sam20110504 and pf9bin and they both seemed fine. Russ

Re: [9fans] sam for Windows?

2014-07-18 Thread 6o205zd02
On 7/10/2014 9:43 AM, Russ Cox rsc-at-swtch.com |9fans| wrote: On Thu, Jul 3, 2014 at 1:39 AM, 6o205z...@sneakemail.com mailto:6o205z...@sneakemail.com wrote: On 6/27/2014 4:38 PM, Russ Cox rsc-at-swtch.com http://rsc-at-swtch.com |9fans| wrote: However, Steve Simon buried the

Re: [9fans] sam for Windows?

2014-07-10 Thread Russ Cox
On Thu, Jul 3, 2014 at 1:39 AM, 6o205z...@sneakemail.com wrote: On 6/27/2014 4:38 PM, Russ Cox rsc-at-swtch.com |9fans| wrote: However, Steve Simon buried the lede in his reply: https://bitbucket.org/ knieriem/pf9/downloads has a working sam, acme, plumber, etc in binary form. I just tested

Re: [9fans] sam for Windows?

2014-07-10 Thread kokamoto
On 6/27/2014 4:38 PM, Russ Cox rsc-at-swtch.com |9fans| wrote: However, Steve Simon buried the lede in his reply: https://bitbucket.org/ knieriem/pf9/downloads has a working sam, acme, plumber, etc in binary form. I just tested that sam and acme from there both work on my fussy 64-bit

Re: [9fans] sam for Windows?

2014-07-02 Thread 6o205zd02
On 6/27/2014 4:38 PM, Russ Cox rsc-at-swtch.com |9fans| wrote: However, Steve Simon buried the lede in his reply: https://bitbucket.org/knieriem/pf9/downloads has a working sam, acme, plumber, etc in binary form. I just tested that sam and acme from there both work on my fussy 64-bit Windows

Re: [9fans] sam for Windows?

2014-06-27 Thread Russ Cox
On Mon, Jun 2, 2014 at 7:19 PM, Lee Fallat ircsurfe...@gmail.com wrote: I just checked on a friend's laptop (AMD64 Windows install)- it works. What doesn't work is this: http://plan9.bell-labs.com/netlib/research/sam.exe ...because it is a 32-bit installer. The link in my previous email

[9fans] sam for Windows?

2014-06-02 Thread Rob Pike
Does anyone know of a version of sam for Windows that will run on 64-bit installations? -rob

Re: [9fans] sam for Windows?

2014-06-02 Thread Steve Simon
The short answer is no. there is the pf9 package which would probably be the best starting point. https://bitbucket.org/knieriem/pf9 I have a similar but less complete toolkit myself, and I still run 32 bit plan9 tools on windows. -Steve

Re: [9fans] sam for Windows?

2014-06-02 Thread Lee Fallat
Does that old version of sam[1] not run on 64-bit Windows? 1: http://plan9.bell-labs.com/sources/extra/9pm051031.zip (the version I ran awhile ago at my college that I think run 64-bit Windows...). On Mon, Jun 2, 2014 at 6:08 PM, Steve Simon st...@quintile.net wrote: The short answer is no.

Re: [9fans] sam for Windows?

2014-06-02 Thread Rob Pike
The old version of sam does not run on 64 bits, I am told. -rob On Mon, Jun 2, 2014 at 3:56 PM, Lee Fallat ircsurfe...@gmail.com wrote: Does that old version of sam[1] not run on 64-bit Windows? 1: http://plan9.bell-labs.com/sources/extra/9pm051031.zip (the version I ran awhile ago at my

Re: [9fans] sam for Windows?

2014-06-02 Thread Lee Fallat
I just checked on a friend's laptop (AMD64 Windows install)- it works. What doesn't work is this: http://plan9.bell-labs.com/netlib/research/sam.exe ...because it is a 32-bit installer. The link in my previous email though, contains a sam that does run! :) Cheers, Lee On Mon, Jun 2, 2014 at

Re: [9fans] sam for Windows?

2014-06-02 Thread Rob Pike
Great, thanks. -rob

Re: [9fans] sam resizing

2013-10-22 Thread Ingo Krabbe
Hey Mark, as you wrote, sam window configuration depends on the situation. But for me its not the number of files that changes the resize options, but the base size of the whole sam workspace. If it's big enough, its resonable to resize the ~~sam~~ command window to an upper left rectangle

Re: [9fans] sam resizing

2013-10-22 Thread erik quanstrom
as you wrote, sam window configuration depends on the situation. But for me its not the number of files that changes the resize options, but the base size of the whole sam workspace. [...] so i'm wondering. acme does a good job of auto layout. the thing acme lacks is a edit buffer (~~sam~~).

Re: [9fans] sam resizing

2013-10-22 Thread Ingo Krabbe
On Tue Oct 22 08:19:47 CES 2013, quans...@quanstro.net wrote: so i'm wondering. acme does a good job of auto layout. the thing acme lacks is a edit buffer (~~sam~~). so maybe it would be fruitful to add edit buffer(s) to acme? - erik I don't think its good to compare acme and sam as the

Re: [9fans] sam resizing

2013-10-22 Thread Mark van Atten
Thanks for the comments! My screen is large, and I use the space the way Ingo describes, putting the edit buffer in the top left corner. But I'd be interested to have the extra option for a while and see if I do find this as useful as it now seems; when I find the time, I may be able to find out

Re: [9fans] sam resizing

2013-10-22 Thread Matthew Veety
On Oct 23, 2013, at 0:00, BurnZeZ brz-systemd-...@intma.in wrote: acme -b You mean ed, right?

[9fans] sam resizing

2013-10-21 Thread Mark van Atten
I would find it useful if a sam window resize could be undone one step, i.e. resize the window again to its size and position before the last resize. Perhaps by clicking B1, just as clicking B3 enlarges it. That would help keeping windows arranged a bit while enlarging one after the other as I

[9fans] sam on Windows?

2013-06-10 Thread Brian Vito
What is the current status of sam on Windows? Does anyone have a version that runs under Windows 7? The one from http://ib.wmipf.de/pf9.html doesn't seem to work anymore. Thanks very much.

Re: [9fans] sam on Windows?

2013-06-10 Thread Paul A. Patience
Brian Vito brian.v...@gmail.com wrote: What is the current status of sam on Windows? Does anyone have a version that runs under Windows 7? The one from http://ib.wmipf.de/pf9.html doesn't seem to work anymore. Thanks very much. latest version is here:

[9fans] sam command language question

2012-08-20 Thread Steve Simon
Tis the season for exotic sam command language questions, though mine is not that exotic. I want to edit some xml (yes I know) and capitalise all the labels in it. I only want to do this once so I don't care that it will envoke tr thousands of times and take a minuite or so. This is what I

Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 13:12, Steve Simon st...@quintile.net wrote: Tis the season for exotic sam command language questions, though mine is not that exotic. I want to edit some xml (yes I know) and capitalise all the labels in it. I only want to do this once so I don't care that it will envoke

Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 13:12, Steve Simon st...@quintile.net wrote: This is what I tried: ,x/label=[^]+/ { x/ [a-z]/ | tr a-z A-Z } sadly the inner 'x' searches onward in the file and not in the selection (dot) generated by the outer 'x'. I do not see the

Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 13:12, Steve Simon st...@quintile.net wrote: ,x/label=[^]+/ { x/ [a-z]/ | tr a-z A-Z } Perhaps, also, I haven't correctly understood what you are after. If what I wrote doesn't solve the problem, an example of what is needed would help. Ruda

Re: [9fans] sam command language question

2012-08-20 Thread Steve Simon
I am confused, and appologise to all for the noise. ,x/label=[^]+/ { x/ [a-z]/ | tr a-z A-Z } does exactly what I wanted, I don't understand why in my toy tests it didn't appear to work, probably a typo. for the record I was tring to do this: label=Hello

Re: [9fans] sam command language question

2012-08-20 Thread Rudolf Sykora
On 20 August 2012 14:25, Steve Simon st...@quintile.net wrote: I am confused, and appologise to all for the noise. ,x/label=[^]+/ { x/ [a-z]/ | tr a-z A-Z } does exactly what I wanted, I don't understand why in my toy tests it didn't appear to work, probably

Re: [9fans] sam, shorten dot by 1 line

2012-08-10 Thread Rudolf Sykora
On 6 August 2012 17:05, Rob Pike robp...@gmail.com wrote: Empty dot at the beginning of a line is also empty dot at the end of the previous line. This is odd, but one can live with that once they know. Nonetheless, It should be written somewhere (man page?). I'm not justifying the behavior,

Re: [9fans] sam, shorten dot by 1 line

2012-08-06 Thread Rudolf Sykora
On 6 August 2012 02:52, Rob Pike robp...@gmail.com wrote: .+0 goes from the end of the current value of dot to the end of the line containing dot. .-0 goes from the beginning of the line containing dot to the beginning of the current value of dot. Yes, this is what I thought. (But is

Re: [9fans] sam, shorten dot by 1 line

2012-08-06 Thread tlaronde
On Mon, Aug 06, 2012 at 09:04:13AM +0200, Rudolf Sykora wrote: This pertains to the example I gave: Having | asdfasdf asdfasdf asdfasdf asdfasdfa asfdsfasdf where | represents an empty dot at the beginning of a line (line as drawn in the editor), .+0 does nothing. According to what

Re: [9fans] sam, shorten dot by 1 line

2012-08-06 Thread Rob Pike
Empty dot at the beginning of a line is also empty dot at the end of the previous line. I'm not justifying the behavior, just explaining it. This is really old code with, I admit, some quirky properties. I often think of rewriting the address code in sam and acme but never do, because a rewrite

Re: [9fans] sam, shorten dot by 1 line

2012-08-05 Thread Rudolf Sykora
Hello 9fans, could at least somebody comment on the situation I observe? I.e., what exactly .+0 means, and why the empty dot at a very beginning of a line (as seen in the editor) seems to actually not be on the line? Thanks Ruda

Re: [9fans] sam, shorten dot by 1 line

2012-08-05 Thread Rob Pike
.+0 goes from the end of the current value of dot to the end of the line containing dot. .-0 goes from the beginning of the line containing dot to the beginning of the current value of dot. I don't understand your second question. -rob

Re: [9fans] sam, shorten dot by 1 line

2012-08-02 Thread Rudolf Sykora
On 2 August 2012 00:21, Rob Pike robp...@gmail.com wrote: .,.+0 means: from the beginning of . to the end of .+0, and .+0 is the null string at the end of . It just does not work for me like that. (.+#0 seems to do what you describe.) 1) Having a line asdfasdf asdfasdf asdfasdf | asdfasdfa

[9fans] sam, shorten dot by 1 line

2012-08-01 Thread Rudolf Sykora
Hello, having a multiline dot in sam, I wanted to shorten it by one line at its end. I tried .,.+0- which did not work. I had to write .,.+1-2 or, hopefully equivalently .,.+-2 While I understand how the latter two ways work, I do not understand why the first does not. Can anybody tell me?

Re: [9fans] sam, shorten dot by 1 line

2012-08-01 Thread Rob Pike
-#0,+#0-2 (go from the null string at the beginning to the null string at the end of the line starting two lines back from the end.) -rob

Re: [9fans] sam, shorten dot by 1 line

2012-08-01 Thread Rudolf Sykora
On 1 August 2012 21:09, Rob Pike robp...@gmail.com wrote: -#0,+#0-2 This really does not answer the question, neither helps to understand. Thanks anyway. Ruda

Re: [9fans] sam, shorten dot by 1 line

2012-08-01 Thread Rudolf Sykora
On 1 August 2012 18:37, Rudolf Sykora rudolf.syk...@gmail.com wrote: .,.+0- It seems a related question is: why +- behaves differently when I am somewhere in the middle of a line (the whole line is then a dot) and when I am at the very beginning of a line (then the *previous* line is

Re: [9fans] sam, shorten dot by 1 line

2012-08-01 Thread Rob Pike
Break it down: a,b means: from the beginning of a to the end of b .,. means: from the beginning of . to the end of . 1 means: from the beginning of line 1 to the end of line 1. .,.+0 means: from the beginning of . to the end of .+0, and .+0 is the null string at the end of . Now the step:

Re: [9fans] sam: mouse focus, chords

2010-09-20 Thread Jorden M
On Sun, Sep 12, 2010 at 5:53 AM, Rudolf Sykora rudolf.syk...@gmail.com wrote: Hello, If I am right, there are some patches enabling mouse chords in sam as well as using focus follows mouse (like acme). I found some kind of the former in Steve Simon's contrib. What about the latter? Thanks

[9fans] sam: mouse focus, chords

2010-09-12 Thread Rudolf Sykora
Hello, If I am right, there are some patches enabling mouse chords in sam as well as using focus follows mouse (like acme). I found some kind of the former in Steve Simon's contrib. What about the latter? Thanks Ruda

Re: [9fans] sam language question

2010-04-23 Thread Rudolf Sykora
On 23 April 2010 00:04, roger peppe rogpe...@gmail.com wrote: another way (and how i would usually do it): ,x g/0\.00/i/\n/ Oh yes, that's probably the best.+- is really unnecessary in this case. Thanks R

[9fans] sam language question

2010-04-22 Thread Rudolf Sykora
Hello, I have a file in which I wanted to insert an empty line just before any line on which a string, say '0.00' is present. My attempts to do it this way: ,x/0.00/+-i/\n/ or similarly were not succesful. I am not sure where the problem is exactly. (Only have some feeling about it, but

Re: [9fans] sam language question

2010-04-22 Thread Rob Pike
,x/0\.00/-a/\n/ -rob

Re: [9fans] sam language question

2010-04-22 Thread yy
2010/4/22 Rudolf Sykora rudolf.syk...@gmail.com: Hello, I have a file in which I wanted to insert an empty line just before any line on which a string, say '0.00' is present. Edit ,x/^.*0\.00/i/\n/ -- - yiyus || JGL . 4l77.com

Re: [9fans] sam language question

2010-04-22 Thread Rudolf Sykora
On 22 April 2010 20:21, Rob Pike robp...@gmail.com wrote: ,x/0\.00/-a/\n/ -rob ok. this works. But what is wrong with mine?! thanks! Ruda

Re: [9fans] sam language question

2010-04-22 Thread Rudolf Sykora
On 22 April 2010 20:24, yy yiyu@gmail.com wrote: Edit ,x/^.*0\.00/i/\n/ The same answer as to Rob Pike. Your solution is ok, thanks. But I still can't see what's wrong with mine... :( R

Re: [9fans] sam language question

2010-04-22 Thread Rudolf Sykora
On 22 April 2010 21:28, yy yiyu@gmail.com wrote: You would need to group your last commands (think carefuly about it): ,x/0.00/{+-i/\n/ } but then you would have to type a bit more. I don't know how it could happen, by the problem I had with ,x/0.00/+-i/\n/ is that it should have been

Re: [9fans] sam language question

2010-04-22 Thread roger peppe
another way (and how i would usually do it): ,x g/0\.00/i/\n/ On 22 April 2010 18:32, Rudolf Sykora rudolf.syk...@gmail.com wrote: Hello, I have a file in which I wanted to insert an empty line just before any line on which a string, say '0.00' is present. My attempts to do it this way:

[9fans] sam complete filenames with Ins/ctrl-f

2010-03-12 Thread Rudolf Sykora
Hello, I'd appreciate if sam completed filenames with ctrl-d/Ins as rio or acme does. Can it? Thanks Ruda

Re: [9fans] sam complete filenames with Ins/ctrl-f

2010-03-12 Thread Rob Pike
The problem is that samterm, which interprets keystrokes, doesn't have access to the files. It would be a protocol change that bounces a message off the server. Doable but not compatible. -rob

[9fans] sam as editor for mutt/pine

2009-08-03 Thread plus 852
Is it possible to use sam as an external editor for the mail programs mutt or pine? If so, is anyone doing this? What does one add to a mutt or pine config file to get this working?

Re: [9fans] sam as editor for mutt/pine

2009-08-03 Thread Noah Evans
I think you want to set your editor to the E program discussed on the list earlier, this will plumb your mails to whatever is listening on the plumb edit port. On Mon, Aug 3, 2009 at 11:13 AM, plus 852plus...@gmail.com wrote: Is it possible to use sam as an external editor for the mail programs

Re: [9fans] sam as editor for mutt/pine

2009-08-03 Thread Lorenzo Bolla
I use it. just stick set editor=sam -d %s to your .muttrc L. On Mon, Aug 3, 2009 at 10:35 AM, Noah Evans noah.ev...@gmail.com wrote: I think you want to set your editor to the E program discussed on the list earlier, this will plumb your mails to whatever is listening on the plumb edit

Re: [9fans] sam as editor for mutt/pine

2009-08-03 Thread Lorenzo Bolla
or set editor=E if you fancy sam with a gui (sorry for the double post) L. On Mon, Aug 3, 2009 at 11:29 AM, Lorenzo Bolla lbo...@gmail.com wrote: I use it. just stick set editor=sam -d %s to your .muttrc L. On Mon, Aug 3, 2009 at 10:35 AM, Noah Evans noah.ev...@gmail.com wrote: I

Re: [9fans] sam as editor for mutt/pine

2009-08-03 Thread J.R. Mauro
On Mon, Aug 3, 2009 at 5:13 AM, plus 852plus...@gmail.com wrote: Is it possible to use sam as an external editor for the mail programs mutt or pine? If so, is anyone doing this? What does one add to a mutt or pine config file to get this working? You definitely want to use E. If you look

Re: [9fans] sam as editor for mutt/pine

2009-08-03 Thread David Leimbach
On Mon, Aug 3, 2009 at 3:13 PM, J.R. Mauro jrm8...@gmail.com wrote: On Mon, Aug 3, 2009 at 5:13 AM, plus 852plus...@gmail.com wrote: Is it possible to use sam as an external editor for the mail programs mutt or pine? If so, is anyone doing this? What does one add to a mutt or pine config

Re: [9fans] Sam commands in acme

2009-06-27 Thread J.R. Mauro
On Fri, Jun 26, 2009 at 6:57 AM, roger pepperogpe...@gmail.com wrote: you need (.|\n) instead of . sam originally used @ as a match everything character but it was removed, presumably because it was rarely used. That's a stupid reason to remove a good feature. By that token, maybe we should

Re: [9fans] Sam commands in acme

2009-06-27 Thread Rob Pike
On Sat, Jun 27, 2009 at 11:17 AM, J.R. Maurojrm8...@gmail.com wrote: On Fri, Jun 26, 2009 at 6:57 AM, roger pepperogpe...@gmail.com wrote: you need (.|\n) instead of . sam originally used @ as a match everything character but it was removed, presumably because it was rarely used. That's a

[9fans] Sam commands in acme

2009-06-26 Thread hugo rivera
Hi, I am trying to select all c comments from within a file using acme, but I am unable to do it properly. The command x/\/\*.*\*\// is the closest I could get, but it doesn't work with comments that span over more than one line. This raises a question for me: somewhere, I cannot recall where, I

Re: [9fans] Sam commands in acme

2009-06-26 Thread yy
2009/6/26 hugo rivera uai...@gmail.com: Hi, I am trying to select all c comments from within a file using acme, but I am unable to do it properly. The command x/\/\*.*\*\// is the closest I could get, but it doesn't work with comments that span over more than one line. This raises a question

Re: [9fans] Sam commands in acme

2009-06-26 Thread roger peppe
you need (.|\n) instead of . sam originally used @ as a match everything character but it was removed, presumably because it was rarely used. to match C comments, you need something like this: x/\/\*([^*]|\*[^\/]|[^*\/]|\n)*\*\// 2009/6/26 hugo rivera uai...@gmail.com: Hi, I am trying to

  1   2   >