GNU bug report logs -
#51377
Automatically exit server when it has no remaining clients
Previous Next
Reported by: Gregory Heytings <gregory <at> heytings.org>
Date: Sun, 24 Oct 2021 15:16:01 UTC
Severity: wishlist
Tags: patch
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #41 received at 51377 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
>
> 1) I think it should check whether there are other *clients*, not other
> *frames*.
>
No, because nowait client frames are not recorded as clients. There's no
way around it, it's necessary to use frames.
>
> 3) `handle-delete-frame' (used when clicking the X button in your window
> manager) can also call `save-buffers-kill-emacs' if the user closed the
> last frame. The logic here should exclude the daemon frame from counting
> as another frame so that closing all frames via the window manager stops
> the daemon too.
>
If it's now also necessary to kill the daemon when you close the last
Emacs frame with the window manager close button (I did not see this
requirement in your original post), then it's also necessary to kill the
daemon when you close the last Emacs frame with C-x 5 0 (delete-frame),
because it's what Emacs tells you to do when you call emacsclient without
a file argument.
Here's a combined patch, which implements the two desired behaviors, and
which I believe handles all cases properly: delete-frame,
handele-delete-frame, save-buffers-kill-terminal, wait and nowait clients.
[Options-to-automatically-stop-the-Emacs-server.patch (text/x-diff, attachment)]
This bug report was last modified 3 years and 256 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.