Discussion:
Show/edit acme snarf buffer
(too old to reply)
Brian Vito
2012-06-25 09:13:46 UTC
Permalink
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer? If so, is there a way to have that
window automatically update when the snarf buffer changes? Basically,
I'm wondering if there is a way to duplicate the functionality that
was generally present in old Macintosh text editors under the show
clipboard command. Finally, if this functionality is available, would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself (as was possible in Nisus's old
editor QUED/M)?
Justin Bedo
2012-06-25 09:58:32 UTC
Permalink
Post by Brian Vito
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer? If so, is there a way to have that
window automatically update when the snarf buffer changes? Basically,
I'm wondering if there is a way to duplicate the functionality that
was generally present in old Macintosh text editors under the show
clipboard command. Finally, if this functionality is available, would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself (as was possible in Nisus's old
editor QUED/M)?
Under Plan 9 there's /dev/snarf.
Richard Miller
2012-06-25 10:24:35 UTC
Permalink
Post by Brian Vito
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer?
/dev/snarf
Post by Brian Vito
If so, is there a way to have that
window automatically update when the snarf buffer changes?
Not quite automatically. You can write a program which polls /dev/snarf
using fstat(2); qid.vers will be updated when the file is written to.
Post by Brian Vito
would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself
Just as with any acme window, the underlying file will only change
when you click Put. Again if you're willing to do some programming,
you could monitor changes in the window using the acme event file
and do the Put automatically.
Brian Vito
2012-07-12 08:52:04 UTC
Permalink
Post by Justin Bedo
Post by Brian Vito
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer?
/dev/snarf
Post by Brian Vito
If so, is there a way to have that
window automatically update when the snarf buffer changes?
Not quite automatically. You can write a program which polls /dev/snarf
using fstat(2); qid.vers will be updated when the file is written to.
Post by Brian Vito
would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself
Just as with any acme window, the underlying file will only change
when you click Put.  Again if you're willing to do some programming,
you could monitor changes in the window using the acme event file
and do the Put automatically.
Thank you -- these are useful suggestions. Is there an equivalent to /
dev/snarf when using plan9port under Mac OS X?

[bv]
andrey mirtchovski
2012-07-12 13:16:17 UTC
Permalink
Post by Brian Vito
Thank you -- these are useful suggestions. Is there an equivalent to /
dev/snarf when using plan9port under Mac OS X?
this is one outdated solution: http://mirtchovski.com/p9/osxsnarf/
Stephen Wiley
2012-06-29 08:54:21 UTC
Permalink
Post by Brian Vito
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer? If so, is there a way to have that
window automatically update when the snarf buffer changes? Basically,
I'm wondering if there is a way to duplicate the functionality that
was generally present in old Macintosh text editors under the show
clipboard command. Finally, if this functionality is available, would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself (as was possible in Nisus's old
editor QUED/M)?
isn't there a snarf file in the filesystem served bu rio?
--
--Sent from my iphone
erik quanstrom
2012-06-29 13:15:01 UTC
Permalink
Post by Stephen Wiley
Post by Brian Vito
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer? If so, is there a way to have that
window automatically update when the snarf buffer changes? Basically,
I'm wondering if there is a way to duplicate the functionality that
was generally present in old Macintosh text editors under the show
clipboard command. Finally, if this functionality is available, would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself (as was possible in Nisus's old
editor QUED/M)?
isn't there a snarf file in the filesystem served bu rio?
it doesn't have the properties the op requested. a read at eof doesn't
hang until the contents of the file have changed.

- erik
Ethan Grammatikidis
2012-06-29 13:55:31 UTC
Permalink
On Fri, 29 Jun 2012 09:15:01 -0400
Post by erik quanstrom
Post by Stephen Wiley
Post by Brian Vito
Using either/both acme under Plan 9 and/or Mac OS X via plan9port, is
there a "file" that can be opened in acme that displays the current
contents of the acme snarf buffer? If so, is there a way to have that
window automatically update when the snarf buffer changes? Basically,
I'm wondering if there is a way to duplicate the functionality that
was generally present in old Macintosh text editors under the show
clipboard command. Finally, if this functionality is available, would
it be possible that by editing the snarf buffer window to edit the
contents of the snarf buffer itself (as was possible in Nisus's old
editor QUED/M)?
isn't there a snarf file in the filesystem served bu rio?
it doesn't have the properties the op requested. a read at eof doesn't
hang until the contents of the file have changed.
If manual update is acceptable he could add "Get" to the tag line.

I guess a simple polling program could be written for acme, but many
uses of the selection while you're editing the text would end up
overwriting your edit.
Loading...