[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: Stefan Monnier
Subject: Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame
Date: Fri, 22 Oct 2021 07:58:34 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> 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 guess it would make sense to try and distinguish the two cases:

- Eager: `emacs --daemon` is run (typically from something like a login
  script or systemd) before any emacsclient is involved.
- Lazy: `emacs --daemon` is started on-demand by the `-a` option
  of `emacsclient` (or via ALTERNATE_EDITOR).

In the lazy case, we could kill the daemon when the last client exits.


reply via email to

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