|
From: | Gregory Heytings |
Subject: | Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame |
Date: | Sat, 23 Oct 2021 19:57:54 +0000 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |