[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: alternative to `kill-emacs-hook' for batch mode?

From: Carsten Dominik
Subject: Re: alternative to `kill-emacs-hook' for batch mode?
Date: Sat, 2 Oct 2010 16:33:46 +0200

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]