[9fans] acme: loading sets of windows

2009-03-16 Thread Michael Brown
Recently I've been finding it useful to open sets of windows in acme
via an rc script, but I have the feeling I'm doing it in a pretty
inelegant way (see basic version of my script below). This has led me
to the following questions:

1. Is there a way to load dumps into a current acme instance via rc?
2. Is there a way to create and delete columns via 9p?

*

#!/usr/local/plan9/bin/rc

fn openset {
for(i in $set) B $i
}

# Hard-delete all open acme windows.
fn cleanslate {
for(i in `{9p ls acme | 9 grep '[0-9]+'}) {
echo delete | 9p write acme/$i/ctl
}
# Avoids pollution of the ps environment.
killall E >[2]/dev/null
}

switch($1) {
case -a
set = ( /path/1 /path/2 )
case *
set = ( /path/3 /path/4 /path/5 )
}

cleanslate
openset



[9fans] invisible prompt in win

2008-10-02 Thread Michael Brown
1. Open a "win" in acme.
2. Scroll down as far as possible.
3. Notice that there is no $prompt visible at left.
4. echo annoying
5. Now scroll back up and it turns out you entered the echo command at
a prompt after all!