emacs-devel
[Top][All Lists]
Advanced

[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: chad
Subject: Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame
Date: Sun, 7 Nov 2021 21:13:36 -0800

On Sun, Oct 24, 2021 at 8:18 AM Gregory Heytings <gregory@heytings.org> wrote:

>
> Even better (because it also works with emacsclient -n):
>
> (when (daemonp) (run-with-timer 2 2 (lambda () (when (<= (length (frame-list)) 1) (save-buffers-kill-emacs)))))
>

Slightly improved and submitted in bug#51377.

Apologies for the thread necromancy; I was away for a long while. While catching up, I wondered if there was an appropriate hook to use, rather than a timer. I think that delete-frame-functions may DTRT, but it depends a bit on the use case.

Hope that helps,
~Chad

 

reply via email to

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