[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: |
Jean Louis |
Subject: |
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame |
Date: |
Mon, 25 Oct 2021 09:19:30 +0300 |
User-agent: |
Mutt/2.0.7+183 (3d24855) (2021-05-28) |
* Stefan Monnier <monnier@iro.umontreal.ca> [2021-10-22 14:59]:
> > 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.
Can the variable `server-clients' help to detect how many clients are there?
Then if so, one can make Emacs Lisp function and put in
configuration file, then such user can have the Emacs Daemon
killed if last client is closed.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/fs
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, (continued)
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Jim Porter, 2021/10/21
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Gregor Zattler, 2021/10/22
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Eli Zaretskii, 2021/10/23
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Gregor Zattler, 2021/10/23
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Eli Zaretskii, 2021/10/23
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Gregor Zattler, 2021/10/23
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Jean Louis, 2021/10/25
- Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Jim Porter, 2021/10/25
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Stefan Monnier, 2021/10/22
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Gregory Heytings, 2021/10/23
Re: [RFC] Option to kill `emacs --daemon' when closing the last client frame, Peter Oliver, 2021/10/25