ram-ashwin@YALE.ARPA (Ashwin Ram) (08/20/87)
I need help with the following task. I'd like to be able to start a process in the background, and have some emacs-lisp code executed after it finishes. For example, consider a version of shell-command that returned immediately after creating a background process to run the shell-command, but popped up a window with the results of the shell-command after the command terminated. Calling call-process with buffer = 0 runs the process in the background, but also throws away the output of the process; also, you can't specify lisp code to be executed after the process does terminate. Can someone tell me how to do this? Thanx in advance. -- Ashwin. ARPA: Ram-Ashwin@cs.yale.edu UUCP: {decvax,linus,seismo}!yale!Ram-Ashwin BITNET: Ram@yalecs
drw@cullvax.UUCP (Dale Worley) (08/21/87)
ram-ashwin@YALE.ARPA (Ashwin Ram) writes: > I'd like to be able to start a process > in the background, and have some emacs-lisp code executed after it finishes. Try: set-process-sentinel: Give PROCESS the sentinel SENTINEL; nil for none. The sentinel is called as a function when the process changes state. It gets two arguments: the process, and a string describing the change. Dale -- Dale Worley Cullinet Software ARPA: cullvax!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!cullvax!drw OS/2: Yesterday's software tomorrow Nuclear war? There goes my career!