GNU bug report logs - #58909
29.0.50; [WIP PATCH] Deleting the last frame of an emacsclient doesn't ask to save

Previous Next

Package: emacs;

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

Date: Sun, 30 Oct 2022 22:30:02 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: Jim Porter <jporterbugs <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 58909 <at> debbugs.gnu.org
Subject: bug#58909: 29.0.50; [WIP PATCH] Deleting the last frame of an emacsclient doesn't ask to save
Date: Mon, 31 Oct 2022 12:38:04 -0700
On 10/31/2022 11:25 AM, Eli Zaretskii wrote:
>> I think it does about the same amount of harm as pressing 'C-x C-c' in
>> an emacs client.
> 
> How can you say that?  "C-x C-c" kills the entire terminal, whereas
> "C-x 5 0" kills just one frame!

When there's only one frame left for the client, 'C-x 5 0' *also* kills 
the entire terminal. That's the only case I want to add a prompt to. I 
agree that if you're only killing a frame, there's no sense in 
prompting. But when killing a frame gets upgraded into killing the 
entire terminal, it then has the same end result as having pressed 'C-x 
C-c'. Shouldn't Emacs then ask the user about what to do before killing 
the terminal?

Of course, 'C-x C-c' also has the effect of killing any other frames for 
that client, but that that doesn't apply there's only one frame. Still, 
'C-x C-c' still prompts in that case too. My understanding is that it 
does so because when an application is waiting for the emacsclient to 
finish, you can't go back from killing the terminal/client; you *can* 
(usually) go back if you're only killing a frame.

See my other message about this too: we could make sure Emacs only 
prompts the user when deleting a frame if doing so would kill a terminal 
that's actually waiting for some files to be saved. If the client was 
invoked with "--no-wait", we could just silently delete the frame: 
there's no application waiting for a file.




This bug report was last modified 1 year and 260 days ago.

Previous Next


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