help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: save-buffers-kill-emacs from remote unix signal?


From: Kevin Rodgers
Subject: Re: save-buffers-kill-emacs from remote unix signal?
Date: Mon, 16 Oct 2006 09:58:00 -0600
User-agent: Thunderbird 1.5.0.7 (Windows/20060909)

georgeryoung@gmail.com wrote:
[GNU emacs 22.0.50.1 sparc-sun-solaris2.9 X-toolkit]
Is there some way I can use a unix signal to remotely cause
emacs to save-buffers-kill-emacs without query,
i.e. as if I had typed ^U^X^C ?   If I leave emacs up in my
office with many unsaved buffers, I'd like to log in from home
and do "kill -something <emacs-pid>" and have it save all
buffers unconditionally and exit.

Does this work (-something is -USR1):

;; See the Misc[ellaneous System] Events node of the Emacs Lisp manual:
(global-set-key [usr1-signal]
                (lambda ()
                  (interactive)
                  (save-buffers-kill-emacs t)))

--
Kevin





reply via email to

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