GNU bug report logs - #3696
23.1.50; C-x # quits the frame before buffer-modified confirmation

Previous Next

Package: emacs;

Reported by: Teemu Likonen <tlikonen <at> iki.fi>

Date: Sat, 27 Jun 2009 18:40:08 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 3696 in the body.
You can then email your comments to 3696 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3696; Package emacs. (Sat, 27 Jun 2009 18:40:09 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teemu Likonen <tlikonen <at> iki.fi>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Sat, 27 Jun 2009 18:40:09 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
Date: Sat, 27 Jun 2009 21:35:35 +0300
In daemon/client mode "C-x #" (server-edit) quits too early from its
frame and leaves the confirm "Buffer foo modified; kill anyway? (yes or
no)" in wrong frame's minibuffer. If there are no other frames the
confirm is totally hidden. Steps to reproduce:

 1. Start Emacs in daemon mode:

        emacs -Q --daemon

 2. Open an independent Emacs frame:

        emacsclient -c -n

 3. Leave that frame and start to edit a file in client mode:

        emacsclient -c -- foo

 4. Frame opens with buffer/file "foo". Now modify the buffer and type
    "C-x #" (server-edit). Answer "n" in the question whether to save
    the file "foo". The frame for file "foo" closes.

 5. In the other frame, the one we opened first, has the question

        Buffer foo modified; kill anyway? (yes or no)

    in its minibuffer. I think it should have been shown in the frame
    where buffer "foo" was.

Here's an example of weird situation this bug can lead to. Don't close
this Emacs daemon session yet.

 6. Close all frames.

 7. Start editing a file:

        emacsclient -c -- foo

 8. Modify the buffer, leave the buffer with "C-x #" and answer "n" in
    the question whether to save the file. The frame for file "foo"
    closes. The confirmation question is invisible because there are no
    frames to show it.

 9. Open new independent frame:

        emacsclient -c -n

10. The frame opens but its content is empty. Emacs is still waiting for
    user's input in the minibuffer but the question is invisible.

11. Press any key to skip the question. Now the frame is displayed
    normally. Buffer "foo" is still in the buffer list.


Quite obviously the question "Buffer foo modified; kill anyway? (yes or
no)" should be displayed in the frame of the buffer "foo" before closing
the frame.



In GNU Emacs 23.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.12.12)
 of 2009-06-27 on mithlond
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--prefix=/home/dtw/local''



Changed bug title to `23.1.50; C-x # quits the frame before buffer-modified confirmation' from `23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode'. Request was from Teemu Likonen <tlikonen <at> iki.fi> to control <at> emacsbugs.donarmstrong.com. (Sat, 27 Jun 2009 19:05:05 GMT) Full text and rfc822 format available.

Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. (Mon, 29 Jun 2009 03:35:03 GMT) Full text and rfc822 format available.

Notification sent to Teemu Likonen <tlikonen <at> iki.fi>:
bug acknowledged by developer. (Mon, 29 Jun 2009 03:35:04 GMT) Full text and rfc822 format available.

Message #12 received at 3696-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Teemu Likonen <tlikonen <at> iki.fi>
Cc: 3696-done <at> debbugs.gnu.org
Subject: Re: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
Date: Sun, 28 Jun 2009 23:29:35 -0400
> In daemon/client mode "C-x #" (server-edit) quits too early from its
> frame and leaves the confirm "Buffer foo modified; kill anyway? (yes or
> no)" in wrong frame's minibuffer.
>
> Quite obviously the question "Buffer foo modified; kill anyway? (yes or
> no)" should be displayed in the frame of the buffer "foo" before closing
> the frame.

I don't see why we need to prompt twice, so in this case it should be OK
to suppress the usual kill-buffer prompt.  I've checked in a fix for
this into the trunk.



Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#3696; Package emacs. (Mon, 29 Jun 2009 05:20:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Teemu Likonen <tlikonen <at> iki.fi>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. (Mon, 29 Jun 2009 05:20:04 GMT) Full text and rfc822 format available.

Message #17 received at 3696 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Teemu Likonen <tlikonen <at> iki.fi>
To: Chong Yidong <cyd <at> stupidchicken.com>
Cc: 3696 <at> debbugs.gnu.org
Subject: Re: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
Date: Mon, 29 Jun 2009 08:13:43 +0300
On 2009-06-28 23:29 (-0400), Chong Yidong wrote:

>> In daemon/client mode "C-x #" (server-edit) quits too early from its
>> frame and leaves the confirm "Buffer foo modified; kill anyway? (yes
>> or no)" in wrong frame's minibuffer.
>>
>> Quite obviously the question "Buffer foo modified; kill anyway? (yes
>> or no)" should be displayed in the frame of the buffer "foo" before
>> closing the frame.
>
> I don't see why we need to prompt twice, so in this case it should be
> OK to suppress the usual kill-buffer prompt. I've checked in a fix for
> this into the trunk.

I like this "prompt only once" behavior with server mode better. Thanks.
It seems to work nicely now.



bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Mon, 27 Jul 2009 14:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 330 days ago.

Previous Next


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