9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] [plan9mod] Re: /mnt/acme empty
@ 2008-09-10  8:48 prem
  2008-09-10 10:06 ` roger peppe
  0 siblings, 1 reply; 4+ messages in thread
From: prem @ 2008-09-10  8:48 UTC (permalink / raw)
  To: 9fans

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 883 bytes --]

On Sep 9, 12:03�pm, quans...@quanstro.net (erik quanstrom) wrote:
> > Hi All,
> > I was trying to write some acme scripts, but eventually found out /mnt/
> > acme is empty.
> > do I need to do anything to get entries under /mnt/acme
> > P.S: /mnt/acme is empty in both 9vx and VMWare'ed Plan9
>
> were you checking from an acme window? �/mnt/acme is not
> part of your login namespace so other windows won't see it.
>
> - erik

Sorry, my mistake I realized soon after posting,
I wrote a small script to tabify/untabify in acme using Russ's tab.c
#!/bin/rc
fn addrdot { echo 'addr=dot' > /mnt/acme/$winid/ctl }
fn tabify {
        { cat /mnt/acme/$winid/xdata && addrdot } | /bin/tab -n4
        }
addrdot && tabify > /mnt/acme/$winid/data

Though it does what it supposed to do, is there a better way of doing
it (I am sure there is :))
Thanks
/Prem



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

* Re: [9fans] [plan9mod] Re: /mnt/acme empty
  2008-09-10  8:48 [9fans] [plan9mod] Re: /mnt/acme empty prem
@ 2008-09-10 10:06 ` roger peppe
  2008-09-10 12:15   ` erik quanstrom
  0 siblings, 1 reply; 4+ messages in thread
From: roger peppe @ 2008-09-10 10:06 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

> I wrote a small script to tabify/untabify in acme using Russ's tab.c

in general, pipe (|) is your friend. it's rare to have to interact with acme's
special files directly.

is there a reason you can't just execute "|tab -n4" ?
(perhaps i've misunderstood the script - i haven't tried it)

slight digression: i have two scripts, called a+ and a-, that
do indentation and un-indentation, as follows:

% cat /bin/a+
#!/bin/rc
if(~ $#* 0){
  * = '	'    # tab
}
sed 's☺^☺'^$1^☺
% cat /bin/a-
#!/bin/rc
if(~ $#* 0){
  * = '	'
}
sed 's☺^'^$1^'☺☺'

the short names are so that they take very little space
in an acme tag. then i have |a+ in the tag of a window,
so i can indent text simply by middle clicking it, two key strokes
and it can be changed to unindent. give it an argument and it can be
used to comment/uncomment blocks of code.

the smiley faces are to avoid doing a proper quoting job
(which i should really do in case i want to indent by '&' or something,
but i've not had the need so far)

i didn't need to mention that, but i have found them
very convenient over the years, so i did. so there.

  rog.

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

* Re: [9fans] [plan9mod] Re: /mnt/acme empty
  2008-09-10 10:06 ` roger peppe
@ 2008-09-10 12:15   ` erik quanstrom
  2008-09-10 17:34     ` roger peppe
  0 siblings, 1 reply; 4+ messages in thread
From: erik quanstrom @ 2008-09-10 12:15 UTC (permalink / raw)
  To: 9fans

> is there a reason you can't just execute "|tab -n4" ?
> (perhaps i've misunderstood the script - i haven't tried it)
>
> slight digression: i have two scripts, called a+ and a-, that
> do indentation and un-indentation, as follows:
>
> % cat /bin/a+
> #!/bin/rc
> if(~ $#* 0){
>   * = '	'    # tab
> }
> sed 's☺^☺'^$1^☺
> % cat /bin/a-
> #!/bin/rc
> if(~ $#* 0){
>   * = '	'
> }
> sed 's☺^'^$1^'☺☺'

alternatively from acme,

	Edit s:^:	:g
or
	Edit s:^	::g

- erik




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

* Re: [9fans] [plan9mod] Re: /mnt/acme empty
  2008-09-10 12:15   ` erik quanstrom
@ 2008-09-10 17:34     ` roger peppe
  0 siblings, 0 replies; 4+ messages in thread
From: roger peppe @ 2008-09-10 17:34 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

On Wed, Sep 10, 2008 at 1:15 PM, erik quanstrom <quanstro@quanstro.net> wrote:
> alternatively from acme,
>
>        Edit s:^:       :g
> or
>        Edit s:^        ::g
>
> - erik

indeed, although i like the one-word nature of |a+ and |a-

that way i can have something else (e.g. a search phrase or
another Edit command) highlighted in the tag, and still single-click
on |a+ to indent without losing it. tag space is at a premium too.



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

end of thread, other threads:[~2008-09-10 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10  8:48 [9fans] [plan9mod] Re: /mnt/acme empty prem
2008-09-10 10:06 ` roger peppe
2008-09-10 12:15   ` erik quanstrom
2008-09-10 17:34     ` roger peppe

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