all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* save-buffers-kill-emacs from remote unix signal?
@ 2006-10-14 15:51 georgeryoung
  2006-10-14 17:16 ` David Hansen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: georgeryoung @ 2006-10-14 15:51 UTC (permalink / raw)


[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.

I know that I can just kill the emacs and reconstruct things from
autosave files, but I operate with *many* active buffers and this
gets to be quite difficult and error prone.

-- George

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: save-buffers-kill-emacs from remote unix signal?
  2006-10-14 15:51 save-buffers-kill-emacs from remote unix signal? georgeryoung
@ 2006-10-14 17:16 ` David Hansen
  2006-10-14 17:45 ` Magnus Henoch
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: David Hansen @ 2006-10-14 17:16 UTC (permalink / raw)


On 14 Oct 2006 08:51:47 -0700 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.

The Multi TTY branch can solve your problem or a bit more
complicated tunnel X via ssh and create a frame on our
$DISPLAY at home using emacsclient.

David

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: save-buffers-kill-emacs from remote unix signal?
  2006-10-14 15:51 save-buffers-kill-emacs from remote unix signal? georgeryoung
  2006-10-14 17:16 ` David Hansen
@ 2006-10-14 17:45 ` Magnus Henoch
  2006-10-16 15:58 ` Kevin Rodgers
       [not found] ` <mailman.8213.1161014465.9609.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Magnus Henoch @ 2006-10-14 17:45 UTC (permalink / raw)


georgeryoung@gmail.com writes:

> 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 ?

You could use the Emacs Server (put (server-start) in your .emacs).
Then you can call "emacsclient -e '(save-buffers-kill-emacs t)'".

Magnus

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: save-buffers-kill-emacs from remote unix signal?
  2006-10-14 15:51 save-buffers-kill-emacs from remote unix signal? georgeryoung
  2006-10-14 17:16 ` David Hansen
  2006-10-14 17:45 ` Magnus Henoch
@ 2006-10-16 15:58 ` Kevin Rodgers
       [not found] ` <mailman.8213.1161014465.9609.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2006-10-16 15:58 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: save-buffers-kill-emacs from remote unix signal?
       [not found] ` <mailman.8213.1161014465.9609.help-gnu-emacs@gnu.org>
@ 2006-10-16 18:10   ` georgeryoung
  0 siblings, 0 replies; 5+ messages in thread
From: georgeryoung @ 2006-10-16 18:10 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-10-16 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-14 15:51 save-buffers-kill-emacs from remote unix signal? georgeryoung
2006-10-14 17:16 ` David Hansen
2006-10-14 17:45 ` Magnus Henoch
2006-10-16 15:58 ` Kevin Rodgers
     [not found] ` <mailman.8213.1161014465.9609.help-gnu-emacs@gnu.org>
2006-10-16 18:10   ` georgeryoung

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.