From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Carsten Dominik Newsgroups: gmane.emacs.devel Subject: Re: alternative to `kill-emacs-hook' for batch mode? Date: Sat, 2 Oct 2010 16:33:46 +0200 Message-ID: <75E9B13B-B111-4842-A76A-63E188458F50@gmail.com> References: <87eic9k6p2.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1286030040 15288 80.91.229.12 (2 Oct 2010 14:34:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 2 Oct 2010 14:34:00 +0000 (UTC) Cc: emacs-devel@gnu.org To: Eric Schulte Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Oct 02 16:33:59 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P239y-00033g-Lp for ged-emacs-devel@m.gmane.org; Sat, 02 Oct 2010 16:33:58 +0200 Original-Received: from localhost ([127.0.0.1]:48250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P239x-000519-VD for ged-emacs-devel@m.gmane.org; Sat, 02 Oct 2010 10:33:57 -0400 Original-Received: from [140.186.70.92] (port=39097 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P239r-00050k-RU for emacs-devel@gnu.org; Sat, 02 Oct 2010 10:33:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P239q-0007YZ-E9 for emacs-devel@gnu.org; Sat, 02 Oct 2010 10:33:51 -0400 Original-Received: from mail-ey0-f169.google.com ([209.85.215.169]:64295) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P239q-0007Vi-6l for emacs-devel@gnu.org; Sat, 02 Oct 2010 10:33:50 -0400 Original-Received: by eyh5 with SMTP id 5so1888197eyh.0 for ; Sat, 02 Oct 2010 07:33:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=Uor1CK26hVjFi9YtDf5aXxk5akRf/lEwFUZwUvTw8oQ=; b=CFWKIa5QzQpEBtGJ78zVjvKnrjTkc2cgD7Y4WDDxMfB0sgRX4ujkplVDJrvLP4eSnL tZmdu5sEbMApMgKuckbFYXx+79KO92pNipVqWcNfkm3HjweUBWss4Og1SPKGbVgXRuaK XTHJ9P+21KKWRsRcFpBNe/5r6Kn2DWDbRFPLw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=pSBS+ms5JsOayYUVxy6jxcwxtrhtBA/CRn7aO+Puk27Wnis2vdyU+DpmQsIHObwREO 2x/mvxShyewC2Hd7ApgPcANJ01orBzron2E51BOtkVBGekeW77bXRy2LWTNokhNspaRR WpGfpMtJLjzH+rx+V/geTg7PIFWdqkWEF5uus= Original-Received: by 10.213.7.131 with SMTP id d3mr6659284ebd.55.1286030029150; Sat, 02 Oct 2010 07:33:49 -0700 (PDT) Original-Received: from [192.168.1.12] (dc5146846e.adsl.wanadoo.nl [81.70.132.110]) by mx.google.com with ESMTPS id a48sm3717734eei.18.2010.10.02.07.33.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 02 Oct 2010 07:33:48 -0700 (PDT) In-Reply-To: <87eic9k6p2.fsf@gmail.com> X-Mailer: Apple Mail (2.936) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:131241 Archived-At: On Oct 1, 2010, at 10:18 PM, Eric Schulte wrote: > I would find such a thing very useful, e.g. when batch exporting > orgmode > files, I'd like to be able to clean up the resultant temporary files. > > Is there currently a mechanism for running code when Emacs exists from > batch mode? If there is not, you can use emacs --batch -eval '(setq this-is-batch-emacs t) .... and test for this variable in your kill-emacs-hook function. Or you can do: emacs --batch -eval "do you babel stuff" -eval "do the cleanup" Hope this gives you some ideas... - Carsten