[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Option to kill `emacs --daemon' when closing the last client f
From: |
Jean Louis |
Subject: |
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame |
Date: |
Mon, 25 Oct 2021 09:20:36 +0300 |
User-agent: |
Mutt/2.0.7+183 (3d24855) (2021-05-28) |
* Gregory Heytings <gregory@heytings.org> [2021-10-23 22:58]:
>
> >
> > I've been experimenting with using `emacs --daemon' and found one part
> > of it to be somewhat surprising. If I set `ALTERNATE_EDITOR' to the
> > empty string and run emacsclient, it runs `emacs --daemon' and connects
> > to it; so far so good. But when I close the Emacs client, the Emacs
> > daemon sticks around; I'd prefer the daemon to stop as well.
> >
>
> Just add
>
> (when (daemonp) (run-with-timer 2 2 (lambda () (unless server-clients
> (save-buffers-kill-emacs)))))
>
> to your init file.
I did not see your message, this is exact idea I had, you have already
written it, but did you test it? Does it work?
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, (continued)
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Stefan Monnier, 2021/10/22
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Gregory Heytings, 2021/10/23
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Peter Oliver, 2021/10/25