9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] p9p: SAM snarf with X
@ 2005-08-26 14:05 Gabriel Diaz
  2005-08-26 14:19 ` Russ Cox
  0 siblings, 1 reply; 8+ messages in thread
From: Gabriel Diaz @ 2005-08-26 14:05 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 84 bytes --]

is that still broken? or i am missing some hiden configuration?

thanks 

gabi

[-- Attachment #2: Type: text/html, Size: 104 bytes --]

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

* Re: [9fans] p9p: SAM snarf with X
  2005-08-26 14:05 [9fans] p9p: SAM snarf with X Gabriel Diaz
@ 2005-08-26 14:19 ` Russ Cox
  2005-08-26 15:01   ` Gabriel Diaz
  0 siblings, 1 reply; 8+ messages in thread
From: Russ Cox @ 2005-08-26 14:19 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> is that still broken? or i am missing some hiden configuration?

Works great for me.  Do you know that sam has its
own snarf buffer and you have to use the <rio> menu
option to swap the X and sam buffers?

If you are running under OS X there are extra issues,
and you have to select Edit, Copy from the X11 menu bar
after you do the <rio> swap, to copy the X11 snarf buffer
to the OS X one.

Russ


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

* Re: [9fans] p9p: SAM snarf with X
  2005-08-26 14:19 ` Russ Cox
@ 2005-08-26 15:01   ` Gabriel Diaz
  0 siblings, 0 replies; 8+ messages in thread
From: Gabriel Diaz @ 2005-08-26 15:01 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 603 bytes --]

Hello,

Thank you very much for the help, i didn't know about the <rio> menu option 
:( 
sorry for the noise

gabi

2005/8/26, Russ Cox <rsc@swtch.com>:
> 
> > is that still broken? or i am missing some hiden configuration?
> 
> Works great for me. Do you know that sam has its
> own snarf buffer and you have to use the <rio> menu
> option to swap the X and sam buffers?
> 
> If you are running under OS X there are extra issues,
> and you have to select Edit, Copy from the X11 menu bar
> after you do the <rio> swap, to copy the X11 snarf buffer
> to the OS X one.
> 
> Russ
>

[-- Attachment #2: Type: text/html, Size: 887 bytes --]

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

* Re: [9fans] p9p: SAM snarf with X
  2005-08-29  0:36 ` Russ Cox
@ 2005-08-29 13:18   ` Richard Bilson
  0 siblings, 0 replies; 8+ messages in thread
From: Richard Bilson @ 2005-08-29 13:18 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On 8/28/05, Russ Cox <rsc@swtch.com> wrote:
> to add chording (presumably cording has something to
> do with processing /sys/log), there is some code that is
> marked with if(chording) in the plan9port version of samterm,
> but rob got it to hang so i disabled it.

I've used the chording support in sam without incident (which, of
course, proves nothing about race conditions), but I should warn that
it does two things that annoy me, given that I'm used to the Acme way:

- B!-2-3 (cut + paste) makes a clean file dirty

- you can't double click to select a word and then chord the resulting selection

I haven't looked closely at the problems, but my intuition says that
they're both hard, given the sam/samterm split.

- Richard


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

* Re: [9fans] p9p: SAM snarf with X
  2005-08-28  3:55 quanstro
  2005-08-28 10:04 ` Gabriel Diaz
@ 2005-08-29  0:36 ` Russ Cox
  2005-08-29 13:18   ` Richard Bilson
  1 sibling, 1 reply; 8+ messages in thread
From: Russ Cox @ 2005-08-29  0:36 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> would it be utter sacrilege and or a complete waste of time
> to add some acme features to samterm like:
> 
> 1. sharing the snarf buffer with the window system.
> 2. cording
> 
> i've been thinking about this for a while, but haven't gotten
> to it.

the two-half structure of sam (+samterm) makes these
interesting, but i think both are possible.  to do the snarf
thing i think you could just change samterm (it knows enough
to know when something has just been cut or is about to be
pasted).  

to add chording (presumably cording has something to
do with processing /sys/log), there is some code that is
marked with if(chording) in the plan9port version of samterm,
but rob got it to hang so i disabled it.  rob said that his earlier
attempts had locking problems too.  i stared at the code for
a while and couldn't figure out what could be wrong (i started
with steve's code and tweaked it a little) and gave up.  i use
acme anyway.  the problem is that the races are hard to 
tickle but really frustrating when you hit one while editing
something important.

> maybe the answer is "use acme, then". but often i want sam.
> it's a lot easier to do some complicated, scripted editing
> with sam than anything else. i like having a terminal-like
> window for editing.

i just open sam when i have a collection of files to do
a lot of regexp work with.  even if acme had what you
ask for above, the ~~sam~~ window is missing.

> btw, this command with acme
> 
>      x:0x....: |tr 'A-Z' 'a-z'
> 
> gave me "addresses out of order". sam was happy with it.
> the text i had selected was like this:
> 
>      {0x00AA, 0x00AA, "whatever",},
>      {0x00BB, 0x00BB, "whatever2",},

this is probably a real bug.

russ


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

* [9fans] p9p: SAM snarf with X
@ 2005-08-28 10:22 Steve Simon
  0 siblings, 0 replies; 8+ messages in thread
From: Steve Simon @ 2005-08-28 10:22 UTC (permalink / raw)
  To: 9fans

Many years ago somone made changes to samterm
which I updated and archived in:

	/n/sources/contrib/steve/doc/sam-chord-patch.txt

Russ has updated this for the P9P samterm but this hasn't
been back ported into the mainline yet (I believe).
This would probably be a better source for the patch
than the bitrot'ed code above.

-Steve


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

* Re: [9fans] p9p: SAM snarf with X
  2005-08-28  3:55 quanstro
@ 2005-08-28 10:04 ` Gabriel Diaz
  2005-08-29  0:36 ` Russ Cox
  1 sibling, 0 replies; 8+ messages in thread
From: Gabriel Diaz @ 2005-08-28 10:04 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

Hi
 I would love to have an -r like option in acme. Then i will use acme all 
the time. 
 Acme is nice when you can mount all you need, but sam is nicer when you 
must do a -r to edit files :).
  gabi

 2005/8/28, quanstro@speakeasy.net <quanstro@speakeasy.net>: 
> 
> would it be utter sacrilege and or a complete waste of time
> to add some acme features to samterm like:
> 
> 1. sharing the snarf buffer with the window system.
> 2. cording
> 
> i've been thinking about this for a while, but haven't gotten
> to it.
> 
> maybe the answer is "use acme, then". but often i want sam.
> it's a lot easier to do some complicated, scripted editing
> with sam than anything else. i like having a terminal-like
> window for editing.
> 
> but since i use acme most of the time, i really grind the
> mental gears switching back.
> 
> maybe what i want is (warning: this idea is half baked)
> editing stripped out of acme and sam run in windows that
> contain files.
> 
> btw, this command with acme
> 
> x:0x....: |tr 'A-Z' 'a-z'
> 
> gave me "addresses out of order". sam was happy with it.
> the text i had selected was like this:
> 
> {0x00AA, 0x00AA, "whatever",},
> {0x00BB, 0x00BB, "whatever2",},
> 
> erik
> 
> 
> 
>

[-- Attachment #2: Type: text/html, Size: 1771 bytes --]

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

* [9fans] p9p: SAM snarf with X
@ 2005-08-28  3:55 quanstro
  2005-08-28 10:04 ` Gabriel Diaz
  2005-08-29  0:36 ` Russ Cox
  0 siblings, 2 replies; 8+ messages in thread
From: quanstro @ 2005-08-28  3:55 UTC (permalink / raw)
  To: 9fans

would it be utter sacrilege and or a complete waste of time 
to add some acme features to samterm like:

1. sharing the snarf buffer with the window system.
2. cording

i've been thinking about this for a while, but haven't gotten 
to it.

maybe the answer is "use acme, then". but often i want sam.
it's a lot easier to do some complicated, scripted editing
with sam than anything else. i like having a terminal-like
window for editing.

but since i use acme most of the time, i really grind the 
mental gears switching back.

maybe what i want is (warning: this idea is half baked)
editing stripped out of acme and sam run in windows that 
contain files.

btw, this command with acme

     x:0x....: |tr 'A-Z' 'a-z'

gave me "addresses out of order". sam was happy with it. 
the text i had selected was like this:

     {0x00AA, 0x00AA, "whatever",},
     {0x00BB, 0x00BB, "whatever2",},

erik





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

end of thread, other threads:[~2005-08-29 13:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-26 14:05 [9fans] p9p: SAM snarf with X Gabriel Diaz
2005-08-26 14:19 ` Russ Cox
2005-08-26 15:01   ` Gabriel Diaz
2005-08-28  3:55 quanstro
2005-08-28 10:04 ` Gabriel Diaz
2005-08-29  0:36 ` Russ Cox
2005-08-29 13:18   ` Richard Bilson
2005-08-28 10:22 Steve Simon

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