Acme SAC for OS X Version 0.27

74 views
Skip to first unread message

underspecified

unread,
Feb 6, 2008, 1:14:26 PM2/6/08
to acme...@googlegroups.com, infern...@vitanuova.com, Fans of the OS Plan 9 from Bell Labs
Greetings,

I'm sorry for the complete lack of updates lately. Things have been
quite busy here ...
There is a new release of Acme SAC for OS X available at
http://acme-sac.googlecode.com/files/AcmeSAC-0.27.dmg
There are no shiny, new features this release, but I squished a couple
of annoying bugs that I felt warranted a release.
Upgrade if you hate it when the carriage return character gets
converted to a newline ;-)

--underspecified

Paul Lalonde

unread,
Feb 7, 2008, 4:50:28 PM2/7/08
to acme...@googlegroups.com, infern...@vitanuova.com
I`m tuning my (slightly crufty) windows environment again.

Is there a way to get Acme SAC to start with particular file/directory
open? The windows executable doesn't seem to accept a file argument.

Paul

Paul Lalonde

unread,
Feb 7, 2008, 5:10:10 PM2/7/08
to acme...@googlegroups.com
One further question - I have a mapped drive (Z:) on my Windows box that
I'd like to see appear in /n. How do I make this happen?

Thanks,
Paul

Caerwyn Jones

unread,
Feb 7, 2008, 8:42:43 PM2/7/08
to acme...@googlegroups.com
For both questions edit $home/lib/profile in your acme-home directory.
You'll see near the bottom the acme command with arguments for the
files or directories it opens by default. Change this line to the
directory you want opened (but see more below).

For binding Z:/, just before the acme command add either
bind '#UZ:/' /n/z
or
trfs '#UZ:/' /n/z
depending on whether the file system contains spaces in the file names.

Or when acme is open run
Local bind '#UZ:/' /n/z

You could make acme.exe take file arguments by editing /lib/sh/profile
and having the arguments passed onto $home/lib/profile. But this isn't
such a good solution if you're trying associate files with Acme on
windows, since you'll get a new Acme for each file.

What you need is something like sam's B command for windows. This
solution was given to me by Arvindh. Unfortunately, it doesn't launch
acme if it's not already running.

Run this in a command tool:

> assoc .txt=AcmeFile
> assoc .b=AcmeFile
> assoc .m=AcmeFile
# and any other files types you want associated with acme

> ftype AcmeFile=C:\acme-sac\acme.exe -r C:\acme-sac sh.dis /Brc %1%


In acme create file /Brc as

mount -ac {mntgen} /n
ndb/cs
mount -A 'tcp!localhost!styx' /n/localhost
bind /n/localhost/chan /chan
plumb $1
shutdown -h

and $home/lib/profile contains

listen -Av 'tcp!*!styx' {export /&}

and your $home/lib/plumbing contains rules for windows file names

# Microsoft Windows file names, assumes C:/ mounted as /n/C, etc.
kind is text
data matches '(^[a-zA-Z]):(.*)'
plumb alwaysstart acme
plumb start /dis/sh.dis -c 'plumb -d edit /n/^ $1 ^`{echo $2 | tr ''\\ '' /␣}'


After all that you can use windows explorer to browse and double click
on files to open them in Acme.

-Caerwyn

roger peppe

unread,
Feb 8, 2008, 5:38:42 AM2/8/08
to acme...@googlegroups.com
On Feb 8, 2008 1:42 AM, Caerwyn Jones <caer...@gmail.com> wrote:
> > assoc .m=AcmeFile

> > ftype AcmeFile=C:\acme-sac\acme.exe -r C:\acme-sac sh.dis /Brc %1%

that's useful information, thanks. i didn't know about those tools.

> What you need is something like sam's B command for windows. This
> solution was given to me by Arvindh. Unfortunately, it doesn't launch
> acme if it's not already running.

presumably it would be straightforward to do that, by running
the normal init script if the mount fails, as long as you've
made some provision for passing through command line arguments
to acme. actually, there's probably a race there when you're
opening several files at once, so you'd have to be slightly cleverer
than that (maybe get the new acme to try to listen on localhost!styx,
mount it if it can't, and start the gui if it can).

rog.

Reply all
Reply to author
Forward
0 new messages