Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!spdcc!m2c!necntc!culdev1!drw From: drw@culdev1.UUCP (Dale Worley) Newsgroups: comp.emacs Subject: get-process-buffer Message-ID: <1748@culdev1.UUCP> Date: Thu, 12-Nov-87 17:15:25 EST Article-I.D.: culdev1.1748 Posted: Thu Nov 12 17:15:25 1987 Date-Received: Sat, 14-Nov-87 20:47:48 EST Organization: Cullinet Software, Westwood, MA, USA Lines: 28 There's a function "set-process-buffer", but there's no complementary "get-process-buffer". Is there another way to do this? I want to set a sentinal on the process "shell", so that when it finishes, the modification-flag of its buffer can be cleared. This isn't too hard: (defun sent (process change) (if (string-equal change "finished\C-j") (save-excursion (set-buffer (get-buffer "*shell*")) (not-modified)))) (set-process-sentinel (get-process "shell") 'sent) But, if I have more than one shell, the function "sent" is only given the process, not the associated buffer, so it can't figure out which modified flag to clear. Clearly, I could make up an a-list of processes and buffers, but there should be an easier way to get the information (name, buffer, state) associated with a process. Dale -- Dale Worley Cullinet Software ARPA: culdev1!drw@eddie.mit.edu UUCP: ...!seismo!harvard!mit-eddie!culdev1!drw If you get fed twice a day, how bad can life be?