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: Eli Zaretskii
Subject: Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame
Date: Sat, 23 Oct 2021 09:23:11 +0300

> From: Gregor Zattler <telegraph@gmx.net>
> Date: Fri, 22 Oct 2021 21:51:17 +0200
> 
> Hi Eli, emacs developers,
> * Eli Zaretskii <eliz@gnu.org> [2021-10-21; 10:34]:
> > We could add a new command to the server-client protocol, and make
> > emacsclient send this command when invoked with the (hypothetical) new
> > command-line option.
> 
> But what happens then if there are two emacsclients
> connecting to the daemon, one with this hypothetical command
> line option, the other one without and the one without is
> the last client which closes it's connection with the
> daemon?

The new protocol command will have been sent by the first emacsclient,
when it starts the server, so which client closes the last is
immaterial, because the decision when to exit will be by the server
based on that new server command it received in the beginning.

> >> Another method might be to add an option like
> >> `daemon-kill-when-no-clients' that defaults to nil. Then after an
> >> `emacsclient' is killed, we can consult that variable, and if it's true,
> >> kill the daemon if there are no remaining clients.
> >
> > That'd require users to modify their init files, which I think is
> > slightly less desirable than the alternative with a new protocol
> > command.
> 
> Only if they want to use that new behaviour.  Emacs users in
> most cases need to do that in order to use newly changed UI
> features.

Yes, but the same is true for the new emacsclient command-line option,
except that changing that is easier done as one-time-only thing than
editing the init files.



reply via email to

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