and type (for example) ‘C-x C-f $go/gnugo.el’ to visit /home/ttn/build/GNU/elpa/packages/gnugo/gnugo.el. Recent Emacs versions can do completion, and even on the env vars! (I marvel at this, taken aback by the mega-cycles burned for such banalities -- i guess i prefer a more lizard-like less-electric lifestyle... [insert more curmudgeonly harumphing] here.) The "scads of short env vars" approach has, over the years, tickled bugs in various tools that presume such env vars are not set, which was annoying at the time, but good for all (me and tools) over the long run, once the tools' authors made them more mindful. I also instrument ‘M-x compile’ like so: (defun rewrite-shell-command-w/cd (string) "If STRING begins w/ \"$foo\", return a new string. In the new string, the \"$foo\" is replaced with \"cd $foo\", and furthermore \"$foo\" is replaced with the value of `(getenv \"foo\")'. For example, if (getenv \"hack\") => \"~/build/hack\", then (rewrite-shell-command-w/cd \"$hack.b ; echo $hack\") => \"cd ~/build/hack.b ; echo $hack\" For other values of STRING, simply return it." (save-match-data (if (string-match "^[$]\\([a-zA-Z_]+\\)" string) (replace-match (concat "cd " (getenv (match-string 1 string))) t t string) string))) (defadvice compilation-start (before rewrite-compilation-command-w/cd activate) "Replace COMMAND using `rewrite-shell-command-w/cd'." (ad-set-arg 0 (rewrite-shell-command-w/cd (ad-get-arg 0)))) and bind ‘M-m’ to ‘compile’, such that (for example) M-m $go ; git remote update RET invokes the "git remote update" command in directory /home/ttn/build/GNU/elpa/packages/gnugo, no matter what the ‘default-directory’ (from current buffer) is at ‘M-m’ time. This is a small step towards the yet- unrealized ideal of having the env var expanded in the command, itself, which involves phasing complications for the expansion of "~", primarily. Maybe Some Day... -- Thien-Thi Nguyen GPG key: 4C807502 (if you're human and you know it) read my lisp: (responsep (questions 'technical) (not (via 'mailing-list))) => nil