Re: [9fans] problem with acme on 9front

2016-05-22 Thread Siarhei Zirukin
In 9front's version of sam there are two additional commands that could
help you with "complex" commands, perhaps.

^ Plan 9-command
   Send the standard output of the Plan 9 command to the
   command window.

_ Plan 9-command
   Send the range to the standard input, and send the
   standard output of the Plan 9 command to the command
   window.

On Sat, May 21, 2016 at 11:52 PM, Mark Lee Smith  wrote:

> Thanks for the interesting comments.
>
> I've been making an effort to use Sam, in the interest of my own
> understanding. One of the biggest barriers I've hit is that there doesn't
> appear to be a good way to save complex edit commands for later. The man
> page suggests that it's possible to send commands to Sam from shell scripts.
>
> External communication
>   Sam listens to the edit plumb port.  If plumbing is not
>   active, on invocation sam creates a named pipe /srv/sam.user
>   which acts as an additional source of commands.  Characters
>   written to the named pipe are treated as if they had been
>   typed in the command window.
>
>   B is a shell-level command that causes an instance of sam
>   running on the same terminal to load the named files. B uses
>   either plumbing or the named pipe, whichever service is
>   available.  If plumbing is not enabled, the option allows a
>   line number to be specified for the initial position to dis-
>   play in the last named file (plumbing provides a more gen-
>   eral mechanism for this ability).
>
>   E is a shell-level command that can be used as $EDITOR in a
>   Unix environment.  It runs B on file and then does not exit
>   until file is changed, which is taken as a signal that file
>   is done being edited.
>
> I use Plan9Port on OpenBSD and typically use the plumber with Acme. I've
> changed "editor" to sam, and read the B and E scripts. As I understand it
> the plumbing approach doesn't allows sending arbitrary commands, so I've
> stopped the plumber. I'm unable to find the named pipe and looking at the
> sam source code it's not obvious to me how or whether such a pipe is
> created. Is this capability still present in Sam? Perhaps the plumber has
> completely subsumed this by now? Ultimately what I'd like to know is how
> you go about reusing common commands? Do you snarf and paste them? I was
> thinking that it would be useful to create scripts like "ap" which select
> the current paragraph (name inspired by Vim.) What's the typical workflow
> when using Sam? I don't deny that it's a great editor. Writing several
> thousand words in Sam yesterday was a pleasure.
>
> Maybe I'm completely off base here?
>
> All the best,
>
> Mark
>
>
>
>
>
> On Fri, 20 May 2016 at 22:05 Steve Simon  wrote:
>
>>
>> I started with Sam a sit ran on all the different unixes I used an vi an
>> emacs just felt clunky.
>>
>> I never got into help and when acme replaced that I just never made the
>> transition.
>>
>> I love Sam, though it is because I know it so well.
>>
>> btw, anyone written scripts to allow the plan9 wiki to be edited from
>> Sam? maybe the wiki is outmoded these days?
>>
>> -Steve
>>
>>
>>
>>


Re: [9fans] 9front sam in plan9port.

2016-05-22 Thread Mart Zirnask
There is also a standalone Unix port of sam that includes chording,
xft, custom colors and a few other hacks. It's a pleasure to work
with; I've even come to prefer the initial, black and white UI.

http://www.deadpixi.com/an-updated-version-of-sam

On 22 May 2016 at 08:29, Iruatã Souza  wrote:
> This is just a port of the 9front version of sam to p9p. As you can see, it
> hasn't been updated in a while. But I can do that if anybody wants it.
>
> Em 21/05/2016 4:50 PM,  escreveu:
>
> #define chording 0  /* code here for reference but it causes deadlocks
> */
>
> I suppose the bug is still messing around.
> I'll give it a try to the 9front version.
>
> Thanks for the info!
>
>



Re: [9fans] 9front sam in plan9port.

2016-05-22 Thread trebol55555
> There is also a standalone Unix port of sam that includes chording,
> xft, custom colors and a few other hacks. It's a pleasure to work
> with; I've even come to prefer the initial, black and white UI.
> 
> http://www.deadpixi.com/an-updated-version-of-sam

It looks grate.




Re: [9fans] problem with acme on 9front

2016-05-22 Thread Mark Lee Smith
Thanks for the heads up Sairhei! I ended up backporting 9front's ^ and _ to
my copy of plan9port. It's not as flexible as having the named pipe around
but it answers the immediate question.

On Sun, 22 May 2016 at 09:38 Siarhei Zirukin  wrote:

> In 9front's version of sam there are two additional commands that could
> help you with "complex" commands, perhaps.
>
> ^ Plan 9-command
>Send the standard output of the Plan 9 command to the
>command window.
>
> _ Plan 9-command
>Send the range to the standard input, and send the
>standard output of the Plan 9 command to the command
>window.
>
> On Sat, May 21, 2016 at 11:52 PM, Mark Lee Smith 
> wrote:
>
>> Thanks for the interesting comments.
>>
>> I've been making an effort to use Sam, in the interest of my own
>> understanding. One of the biggest barriers I've hit is that there doesn't
>> appear to be a good way to save complex edit commands for later. The man
>> page suggests that it's possible to send commands to Sam from shell scripts.
>>
>> External communication
>>   Sam listens to the edit plumb port.  If plumbing is not
>>   active, on invocation sam creates a named pipe /srv/sam.user
>>   which acts as an additional source of commands.  Characters
>>   written to the named pipe are treated as if they had been
>>   typed in the command window.
>>
>>   B is a shell-level command that causes an instance of sam
>>   running on the same terminal to load the named files. B uses
>>   either plumbing or the named pipe, whichever service is
>>   available.  If plumbing is not enabled, the option allows a
>>   line number to be specified for the initial position to dis-
>>   play in the last named file (plumbing provides a more gen-
>>   eral mechanism for this ability).
>>
>>   E is a shell-level command that can be used as $EDITOR in a
>>   Unix environment.  It runs B on file and then does not exit
>>   until file is changed, which is taken as a signal that file
>>   is done being edited.
>>
>> I use Plan9Port on OpenBSD and typically use the plumber with Acme. I've
>> changed "editor" to sam, and read the B and E scripts. As I understand it
>> the plumbing approach doesn't allows sending arbitrary commands, so I've
>> stopped the plumber. I'm unable to find the named pipe and looking at the
>> sam source code it's not obvious to me how or whether such a pipe is
>> created. Is this capability still present in Sam? Perhaps the plumber has
>> completely subsumed this by now? Ultimately what I'd like to know is how
>> you go about reusing common commands? Do you snarf and paste them? I was
>> thinking that it would be useful to create scripts like "ap" which select
>> the current paragraph (name inspired by Vim.) What's the typical workflow
>> when using Sam? I don't deny that it's a great editor. Writing several
>> thousand words in Sam yesterday was a pleasure.
>>
>> Maybe I'm completely off base here?
>>
>> All the best,
>>
>> Mark
>>
>>
>>
>>
>>
>> On Fri, 20 May 2016 at 22:05 Steve Simon  wrote:
>>
>>>
>>> I started with Sam a sit ran on all the different unixes I used an vi an
>>> emacs just felt clunky.
>>>
>>> I never got into help and when acme replaced that I just never made the
>>> transition.
>>>
>>> I love Sam, though it is because I know it so well.
>>>
>>> btw, anyone written scripts to allow the plan9 wiki to be edited from
>>> Sam? maybe the wiki is outmoded these days?
>>>
>>> -Steve
>>>
>>>
>>>
>>>
>


Re: [9fans] 9front sam in plan9port.

2016-05-22 Thread Mark Lee Smith
This is very cool. I just got it built/running on OpenBSD 5.9. The only
problem seems to be that the code is quite old? (It's very different from
that in Plan9Port's and 9front's version.)

I wasn't able to get it working remotely because the additional 'rsam'
command doesn't seem to be built. I haven't looked at that yet though.

This still uses the named pipe for communicating with sam from the outside,
which is quite useful. I may try to port that to my copy.

This might be obvious, but that you can use this samterm with sam from
Plan9Ports (and presumably 9front). And It will work remotely then.

All the best,

Mark

On Sun, 22 May 2016 at 13:10 Mart Zirnask  wrote:

> There is also a standalone Unix port of sam that includes chording,
> xft, custom colors and a few other hacks. It's a pleasure to work
> with; I've even come to prefer the initial, black and white UI.
>
> http://www.deadpixi.com/an-updated-version-of-sam
>
> On 22 May 2016 at 08:29, Iruatã Souza  wrote:
> > This is just a port of the 9front version of sam to p9p. As you can see,
> it
> > hasn't been updated in a while. But I can do that if anybody wants it.
> >
> > Em 21/05/2016 4:50 PM,  escreveu:
> >
> > #define chording 0  /* code here for reference but it causes
> deadlocks
> > */
> >
> > I suppose the bug is still messing around.
> > I'll give it a try to the 9front version.
> >
> > Thanks for the info!
> >
> >
>
>


Re: [9fans] 9front sam in plan9port.

2016-05-22 Thread Mark Lee Smith
I'd be interested in this. I just backported _ and ^, but I don't have the
time to backport anything else for the moment. It would save me (probably
others) a lot of time if we could get this into the "official" Plan9Port :).

On Sun, 22 May 2016 at 07:31 Iruatã Souza  wrote:

> This is just a port of the 9front version of sam to p9p. As you can see,
> it hasn't been updated in a while. But I can do that if anybody wants it.
> Em 21/05/2016 4:50 PM,  escreveu:
>
> #define chording 0  /* code here for reference but it causes deadlocks
> */
>
> I suppose the bug is still messing around.
> I'll give it a try to the 9front version.
>
> Thanks for the info!
>
>
>


[9fans] Looking for Printed Plan 9 Manuals

2016-05-22 Thread Brian Vito
I am looking to purchase printed editions of the Plan 9 (and/or Unix) manuals,
principally the 2nd and 3rd edition manuals. Please contact me if you are 
willing
to part with copies for reasonable compensation. Thanks very much.




Re: [9fans] 9front sam in plan9port.

2016-05-22 Thread trebol55555
https://bitbucket.org/iru/sam9f-unix

--- /tmp/iru-sam9f-unix-4d050a28ac71/samterm/main.c 2014-09-02 
17:13:07.0 +0100
+++ samterm/main.c  2016-05-22 18:26:00.855472411 +0100
@@ -476,14 +476,14 @@
Ksoh=   0x01,
Kstx=   0x02,
Ketx=   0x03,
-   Keof=   0x04,
+// Keof=   0x04,
Kenq=   0x05,
Kack=   0x06,
-   Kbs=0x08,
+// Kbs=0x08,
Knack=  0x15,
Ketb=   0x17,
-   Kdel=   0x7f,
-   Kesc=   0x1b,
+// Kdel=   0x7f,
+// Kesc=   0x1b,
 };