From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Gordon Beaton Newsgroups: gmane.emacs.help Subject: Re: passing data to process sentinel Date: 16 Sep 2006 07:37:02 GMT Organization: - Message-ID: <450ba99e$0$19430$8404b019@news.wineasy.se> References: <450a8bcc$0$19463$8404b019@news.wineasy.se> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1158392435 30860 80.91.229.2 (16 Sep 2006 07:40:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 16 Sep 2006 07:40:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 16 09:40:35 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GOUmq-0004Bc-Kf for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Sep 2006 09:40:29 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GOUmq-0003ME-40 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Sep 2006 03:40:28 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!uio.no!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!inet.fi!fi.sn.net!newsfeed2.fi.sn.net!news.song.fi!not-for-mail Original-Newsgroups: gnu.emacs.help X-No-Productlinks: yes User-Agent: slrn/0.9.8.1 (Linux) Original-Lines: 21 Original-NNTP-Posting-Host: cube.smaltan.org Original-X-Trace: 1158392222 news.wineasy.se 19430 195.42.215.17:64523 Original-X-Complaints-To: abuse@tdcsong.se Original-Xref: shelby.stanford.edu gnu.emacs.help:141784 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:37406 Archived-At: On Fri, 15 Sep 2006 11:01:15 -0600, Kevin Rodgers wrote: > Backquote is your friend: > > (set-process-sentinel > (start-process "tkdiff" nil "tkdiff" (buffer-file-name) temp-file) > `(lambda (process event) > (if (file-exists-p ,temp-file) (delete-file ,temp-file)))) Thank you! I had tried backquoting but it was the commas I didn't think about. I also realized after posting that I could get the file name from (process-command process) in the sentinel, but I was more interested in a solution like the above that works in the general case, where the information isn't on the command line. /gordon -- [ don't email me support questions or followups ] g o r d o n + n e w s @ b a l d e r 1 3 . s e