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: georgeryoung
Subject: Re: save-buffers-kill-emacs from remote unix signal?
Date: 16 Oct 2006 11:10:25 -0700
User-agent: G2/1.0

Kevin Rodgers wrote:
> 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)))

Yes!  That works perfectly!  Thanks very much.
-- George



reply via email to

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