[Top][All Lists]

[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: Thu, 21 Oct 2021 09:07:36 +0300

> From: Jim Porter <jporterbugs@gmail.com>
> Date: Wed, 20 Oct 2021 13:07:02 -0700
> Cc: emacs-devel@gnu.org
> > 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.
> Right, that's what I currently do. However, I've run into a couple 
> problems that have made me think `emacs --daemon' would be a better 
> solution. Under a non-daemon[1] configuration:
> 1) `org-protocol://' links don't work if Emacs isn't already running. 
> This is because org-protocol advises `server-visit-files' to detect when 
> a link with that protocol is passed as a file argument on the command 
> line. Since this argument is passed to the "alternate" Emacs, it's not 
> handled in `server-visit-files' and so the org-protocol code never runs.

This sounds like a problem in org-protocol that should be solved
there.  If doing so requires some core feature we don't have, let's
discuss that missing feature.  But changing the behavior of the
daemon, which will affect also all the other use cases unrelated to
this one, is not TRT, IMO.

> 2) The first place Emacs is opened is the "primary" instance. This isn't 
> usually a problem when you only run Emacs graphically, but if mixing GUI 
> and terminal instances, it'd be nice to allow closing the first instance 
> and keep the others open. For example, if you start editing in a 
> terminal Emacs and open a GUI Emacs client, the GUI Emacs can only live 
> as long as the terminal one.

I don't follow this one.  What exactly do you mean by "primary" here,
and what do you mean by "instance"?  In the scenario you described
there's only one instance of Emacs running, as I'm sure you know very
well.  Please elaborate.

reply via email to

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