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: Wed, 20 Oct 2021 15:13:14 +0300

> From: Jim Porter <jporterbugs@gmail.com>
> Date: Tue, 19 Oct 2021 21:20:35 -0700
> 
> 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.
> 
> This would allow for a behavior similar to other (graphical) programs: 
> if I run `firefox example.com', it starts a new instance as normal. If I 
> run it again, it opens a new tab in the existing instance. If I close 
> all the Firefox windows, all the associated processes terminate.

Unlike "other programs", Emacs doesn't aim to support such use
patterns with the ALTERNATE_EDITOR thing.  It is supposed to allow the
user to invoke emacsclient without knowing whether a server already
runs, by starting the server the first time.  That is why we don't
kill the server when the last client exits: it is against the use case
we want to support.

We could add an optional command-line argument to do what you want,
but I wonder why would that be useful, when we already have
kill-emacs.



reply via email to

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