unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
@ 2009-06-27 18:35 ` Teemu Likonen
  2009-06-29  3:35   ` bug#3696: marked as done (23.1.50; C-x # quits the frame before buffer-modified confirmation) Emacs bug Tracking System
  0 siblings, 1 reply; 3+ messages in thread
From: Teemu Likonen @ 2009-06-27 18:35 UTC (permalink / raw)
  To: emacs-pretest-bug

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''





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#3696: marked as done (23.1.50; C-x # quits the frame before buffer-modified confirmation)
  2009-06-27 18:35 ` bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode Teemu Likonen
@ 2009-06-29  3:35   ` Emacs bug Tracking System
  0 siblings, 0 replies; 3+ messages in thread
From: Emacs bug Tracking System @ 2009-06-29  3:35 UTC (permalink / raw)
  To: Chong Yidong

[-- Attachment #1: Type: text/plain, Size: 930 bytes --]


Your message dated Sun, 28 Jun 2009 23:29:35 -0400
with message-id <87eit3zpi8.fsf@stupidchicken.com>
and subject line Re: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
has caused the Emacs bug report #3696,
regarding 23.1.50; C-x # quits the frame before buffer-modified confirmation
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
3696: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=3696
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems

[-- Attachment #2: Type: message/rfc822, Size: 4124 bytes --]

From: Teemu Likonen <tlikonen@iki.fi>
To: emacs-pretest-bug@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
Message-ID: <87tz21r0co.fsf@iki.fi>

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''


[-- Attachment #3: Type: message/rfc822, Size: 1966 bytes --]

From: Chong Yidong <cyd@stupidchicken.com>
To: Teemu Likonen <tlikonen@iki.fi>
Cc: 3696-done@emacsbugs.donarmstrong.com
Subject: Re: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
Date: Sun, 28 Jun 2009 23:29:35 -0400
Message-ID: <87eit3zpi8.fsf@stupidchicken.com>

> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode
       [not found] <87eit3zpi8.fsf@stupidchicken.com>
  2009-06-27 18:35 ` bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode Teemu Likonen
@ 2009-06-29  5:13 ` Teemu Likonen
  1 sibling, 0 replies; 3+ messages in thread
From: Teemu Likonen @ 2009-06-29  5:13 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 3696

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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-06-29  5:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <87eit3zpi8.fsf@stupidchicken.com>
2009-06-27 18:35 ` bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode Teemu Likonen
2009-06-29  3:35   ` bug#3696: marked as done (23.1.50; C-x # quits the frame before buffer-modified confirmation) Emacs bug Tracking System
2009-06-29  5:13 ` bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode Teemu Likonen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).