From unknown Sun Jun 22 00:54:11 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode Reply-To: Teemu Likonen , 3696@debbugs.gnu.org Resent-From: Teemu Likonen Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Sat, 27 Jun 2009 18:40:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: report 3696 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by submit@emacsbugs.donarmstrong.com id=B.124612775331233 (code B ref -1); Sat, 27 Jun 2009 18:40:08 +0000 Received: (at submit) by emacsbugs.donarmstrong.com; 27 Jun 2009 18:35:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL,URIBL_RHS_DOB autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5RIZmKB031155 for ; Sat, 27 Jun 2009 11:35:49 -0700 Received: from mail.gnu.org ([199.232.76.166]:55876 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MKckd-0001kO-Qx for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 14:35:47 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MKckb-0005vF-Gm for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 14:35:47 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:56270 helo=jenni2.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKckb-0005uR-0D for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 14:35:45 -0400 Received: from mithlond.arda.local (80.220.180.181) by jenni2.inet.fi (8.5.014) id 49F5CB640236CB25 for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 21:35:35 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MKckR-00029d-BX for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 21:35:35 +0300 From: Teemu Likonen To: emacs-pretest-bug@gnu.org Date: Sat, 27 Jun 2009 21:35:35 +0300 Message-ID: <87tz21r0co.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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'' From tlikonen@iki.fi Sat Jun 27 11:58:14 2009 Received: (at control) by emacsbugs.donarmstrong.com; 27 Jun 2009 18:58:14 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL,ONEWORD,VALID_BTS_CONTROL autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from jenni2.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5RIw9Ne002255 for ; Sat, 27 Jun 2009 11:58:11 -0700 Received: from mithlond.arda.local (80.220.180.181) by jenni2.inet.fi (8.5.014) id 49F5CB640236DFF0 for control@emacsbugs.donarmstrong.com; Sat, 27 Jun 2009 21:58:09 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MKd6G-0002CD-Oe for control@emacsbugs.donarmstrong.com; Sat, 27 Jun 2009 21:58:08 +0300 From: Teemu Likonen To: control@debbugs.gnu.org Subject: retitle Date: Sat, 27 Jun 2009 21:58:08 +0300 Message-ID: <87prcpqzb3.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii retitle 3696 23.1.50; C-x # quits the frame before buffer-modified confirmation From unknown Sun Jun 22 00:54:11 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: owner@emacsbugs.donarmstrong.com From: help-debbugs@gnu.org (Emacs bug Tracking System) To: Teemu Likonen Subject: bug#3696 closed by Chong Yidong (Re: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode) Message-ID: References: <87eit3zpi8.fsf@stupidchicken.com> <87tz21r0co.fsf@iki.fi> X-Emacs-PR-Message: they-closed 3696 X-Emacs-PR-Package: emacs Reply-To: 3696@debbugs.gnu.org Date: Mon, 29 Jun 2009 03:35:04 +0000 Content-Type: multipart/mixed; boundary="----------=_1246246504-17403-1" This is a multi-part message in MIME format... ------------=_1246246504-17403-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an automatic notification regarding your bug report which was filed against the emacs package: #3696: 23.1.50; C-x # quits the frame before buffer-modified confirmation It has been closed by Chong Yidong . Their explanation is attached below along with your original report. If this explanation is unsatisfactory and you have not received a better one in a separate message then please contact Chong Yidong by replying to this email. --=20 3696: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D3696 Emacs Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1246246504-17403-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 3696-done) by emacsbugs.donarmstrong.com; 29 Jun 2009 03:29:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.1 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from pantheon-po31.its.yale.edu (pantheon-po31.its.yale.edu [130.132.50.82]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5T3TgcW016518 for <3696-done@emacsbugs.donarmstrong.com>; Sun, 28 Jun 2009 20:29:43 -0700 Received: from furry (c-71-192-161-14.hsd1.nh.comcast.net [71.192.161.14]) (authenticated bits=0) by pantheon-po31.its.yale.edu (8.12.11.20060308/8.12.11) with ESMTP id n5T3TZCT011847 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sun, 28 Jun 2009 23:29:35 -0400 Received: by furry (Postfix, from userid 1000) id 78856C09B; Sun, 28 Jun 2009 23:29:35 -0400 (EDT) From: Chong Yidong To: Teemu Likonen Cc: 3696-done@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 Message-ID: <87eit3zpi8.fsf@stupidchicken.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-YaleITSMailFilter: Version 1.2c (attachment(s) not renamed) > 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. ------------=_1246246504-17403-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by emacsbugs.donarmstrong.com; 27 Jun 2009 18:35:53 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.3 required=4.0 tests=AWL,URIBL_RHS_DOB autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5RIZmKB031155 for ; Sat, 27 Jun 2009 11:35:49 -0700 Received: from mail.gnu.org ([199.232.76.166]:55876 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1MKckd-0001kO-Qx for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 14:35:47 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1MKckb-0005vF-Gm for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 14:35:47 -0400 Received: from mta-out.inet.fi ([195.156.147.13]:56270 helo=jenni2.inet.fi) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MKckb-0005uR-0D for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 14:35:45 -0400 Received: from mithlond.arda.local (80.220.180.181) by jenni2.inet.fi (8.5.014) id 49F5CB640236CB25 for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 21:35:35 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1MKckR-00029d-BX for emacs-pretest-bug@gnu.org; Sat, 27 Jun 2009 21:35:35 +0300 From: Teemu Likonen 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> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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'' ------------=_1246246504-17403-1-- From unknown Sun Jun 22 00:54:11 2025 X-Loop: owner@emacsbugs.donarmstrong.com Subject: bug#3696: 23.1.50; Buffer-modified confirmation goes to wrong frame in daemon mode Reply-To: Teemu Likonen , 3696@debbugs.gnu.org Resent-From: Teemu Likonen Resent-To: bug-submit-list@lists.donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 29 Jun 2009 05:20:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-Emacs-PR-Message: followup 3696 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Received: via spool by 3696-submit@emacsbugs.donarmstrong.com id=B3696.12462524322049 (code B ref 3696); Mon, 29 Jun 2009 05:20:04 +0000 Received: (at 3696) by emacsbugs.donarmstrong.com; 29 Jun 2009 05:13:52 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-0.7 required=4.0 tests=AWL autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from kirsi1.inet.fi (mta-out.inet.fi [195.156.147.13]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id n5T5Dlau002034 for <3696@emacsbugs.donarmstrong.com>; Sun, 28 Jun 2009 22:13:48 -0700 Received: from mithlond.arda.local (80.220.180.181) by kirsi1.inet.fi (8.5.014) id 49F6055A023EC764; Mon, 29 Jun 2009 08:13:44 +0300 Received: from dtw by mithlond.arda.local with local (Exim 4.69) (envelope-from ) id 1ML9BX-0000aY-K0; Mon, 29 Jun 2009 08:13:43 +0300 From: Teemu Likonen To: Chong Yidong Cc: 3696@debbugs.gnu.org In-Reply-To: <87eit3zpi8.fsf@stupidchicken.com> (Chong Yidong's message of "Sun, 28 Jun 2009 23:29:35 -0400") References: <87eit3zpi8.fsf@stupidchicken.com> Date: Mon, 29 Jun 2009 08:13:43 +0300 Message-ID: <87ws6v62rc.fsf@iki.fi> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.