Path: utzoo!telly!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!tut.cis.ohio-state.edu!unmvax!indri!xanth!lll-winken!uunet!mcvax!hp4nl!mhres!jv From: jv@mhres.mh.nl (Johan Vromans) Newsgroups: gnu.emacs Subject: (a)synchrounous shell commands Message-ID: <3176@mhres.mh.nl> Date: 21 May 89 09:29:00 GMT Organization: Multihouse NV, the Netherlands Lines: 27 A little while ago, tytso@ATHENA.MIT.EDU (Theodore Ts'o) posted a modified version of shell-command (called scommand), which allowed commands to be run in parralell with the editor, while watching the output grow. I found the following extension trivial and handy: using the '&' to denote background processing reminds me of a popular operating system. ;; ;; (A)synch shell command execution (defun my-scommand (command &optional flag) "Runs shell command asynchrounous, or synchrounous if terminated with \"&\"" (interactive "sShell command: \nP") (if (string-match "&$" command) (scommand (substring command 0 -1) flag) (shell-command command flag) )) (autoload 'scommand "scommand" "Enhanced shell-command" t) (global-set-key "!" 'my-scommand) Have fun. -- Johan Vromans jv@mh.nl via european backbone (mcvax) Multihouse Automatisering bv uucp: ..!{mcvax,hp4nl}!mh.nl!jv Doesburgweg 7 phone: +31 1820 62944 2803 PL Gouda - The Netherlands fax: +31 1820 62500