mrd@SUN.MCS.CLARKSON.EDU ("Michael R. DeCorte") (01/13/88)
A little while ago someone asked for an alias that would either execute emacs or if emacs was in the background do an fg on it. This is an improved version of the one I had sent in then. This only calls ps and sed. It used to call tail and egrep also. To use it just pop the line below into your .cshrc and instead of typing emacs you have to type gnu. If you really want to type emacs you can modify the script and substitue the 'emacs' on the end with the actual path of your emacs. So instead of 'emacs' you would have say '/usr/local/bin/emacs'. Then you could call the alias emacs instead. alias gnu 'eval `ps | sed -e "s/.*[e]macs.*/fg %/" -e "t" -e "d" `'emacs'' Michael DeCorte mrd@clutx.clarkson.edu mrd@clutx.bitnet
tml@santra.UUCP (01/15/88)
Just in case nobody has thought of this: alias e "alias e %emacs; emacs" Yes, I know it doesn't work if you leave Emacs with C-X C-C, but doesn't everyone keep the same Emacs hanging around the whole day? -- Tor Lillqvist, Technical Research Centre of Finland tml@fingate.bitnet == tml@santra.uucp == mcvax!santra!tml