GNU bug report logs - #58404
29.0.50; [PATCH] When killing Emacs from the last client, don't warn about the session having clients

Previous Next

Package: emacs;

Reported by: Jim Porter <jporterbugs <at> gmail.com>

Date: Sun, 9 Oct 2022 23:33:01 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Jim Porter <jporterbugs <at> gmail.com>
Subject: bug#58404: closed (Re: bug#58404: 29.0.50; [PATCH] When killing
 Emacs from the last client, don't warn about the session having clients)
Date: Mon, 10 Oct 2022 23:10:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#58404: 29.0.50; [PATCH] When killing Emacs from the last client, don't warn about the session having clients

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 58404 <at> debbugs.gnu.org.

-- 
58404: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=58404
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58404-done <at> debbugs.gnu.org
Subject: Re: bug#58404: 29.0.50; [PATCH] When killing Emacs from the last
 client, don't warn about the session having clients
Date: Mon, 10 Oct 2022 16:09:08 -0700
On 10/10/2022 10:57 AM, Eli Zaretskii wrote:
>> Date: Mon, 10 Oct 2022 10:49:05 -0700
>> Cc: 58404 <at> debbugs.gnu.org
>> From: Jim Porter <jporterbugs <at> gmail.com>
>>
>> Attached is a new patch that removes the prompt when called from the
>> last remaining client. I also expanded the docstring to explain why the
>> prompt is there.
> 
> LGTM, thanks.

Thanks, merged as ebc19f56aaeb98b834eea1ce8768ca13bed8578c. Closing this 
bug.

[Message part 3 (message/rfc822, inline)]
From: Jim Porter <jporterbugs <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] When killing Emacs from the last client, don't warn
 about the session having clients
Date: Sun, 9 Oct 2022 16:32:28 -0700
[Message part 4 (text/plain, inline)]
To reproduce:

  $ emacs -Q --daemon
  $ emacsclient foo.txt

  M-x save-buffers-kill-emacs
  => This Emacs session has clients; exit anyway?

I think that's unnecessary. Since we're in the last (only) client, we 
can't accidentally kill other clients that we don't see right now (e.g. 
ones in an SSH connection); they don't exist! Couldn't we just proceed 
ahead without the prompt?

On the other hand, I think it *would* be useful to prompt if you're in 
the last client, but there are other non-client frames. This can happen 
if you start the main Emacs process without --daemon or if you use 
--no-wait. For example:

  $ emacs -Q --daemon
  $ emacsclient foo.txt
  $ emacsclient --no-wait -c bar.txt

  ;; From the first client:
  M-x save-buffers-kill-emacs
  => This Emacs session has clients; exit anyway?

This is ok, except the prompt could be clearer. The real issue is that 
the session has non-client frames that would get killed.

Attached is a patch to do this.
[0001-Don-t-prompt-when-killing-an-Emacs-client-if-it-s-th.patch (text/plain, attachment)]

This bug report was last modified 2 years and 219 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.