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: Tomasz Konojacki
Subject: Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame
Date: Wed, 20 Oct 2021 06:36:41 +0200

On Tue, 19 Oct 2021 21:20:35 -0700
Jim Porter <jporterbugs@gmail.com> wrote:

> 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.
> 
> I didn't see any options to configure this behavior in Emacs, but looking 
> over the code, it shouldn't be that hard for me to write a patch to add this 
> as an option. Before I started though, I wanted to see what others thought. 
> Is this a behavior others would be interested in? If so, are there any other 
> particulars I should take into account in my patch?
> 
> - Jim

You will get that behaviour if you put (server-start) in your init.el
and set --alternate-editor to the emacs binary, not just an empty string.



reply via email to

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