From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' [PATCH] Date: Sun, 27 May 2012 15:21:22 +0200 Message-ID: <4FC22A52.8050908@gmx.at> References: <90E09641E9264B37932D2315E5E7E2EA@us.oracle.com><4CF7EDED.5090500@gmx.at><44FB8E26FD824BB18AE8A367F560C091@us.oracle.com><4CF8A7B2.5080306@gmx.at><6119F1CF7E7141E28FA3CDF62C165B19@us.oracle.com><4F7EF782.6020103@gmx.at><4F7F0386.6030909@gmx.at><7F573FD9970448A282AF763F35489AA3@us.oracle.com><4F7F0FF8.7090401@gmx.at><4F7F203F.90101@gmx.at><19CE4DF0C5AC4DFE86074D71C7FC3985@us.oracle.com> <0F6E005543DB4891A01F42BEA11DE520@us.oracle.com> <7783B19C74CD4DFAA1E6410A507A69C8@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1338124921 26821 80.91.229.3 (27 May 2012 13:22:01 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 27 May 2012 13:22:01 +0000 (UTC) Cc: 7533@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 27 15:22:00 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SYdPw-0005KY-EU for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 May 2012 15:21:56 +0200 Original-Received: from localhost ([::1]:43444 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYdPw-0004JB-47 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 May 2012 09:21:56 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYdPs-0004Ii-Jt for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 09:21:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SYdPq-0000ig-P3 for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 09:21:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SYdPq-0000ic-L1 for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 09:21:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SYdR0-0005b5-4C for bug-gnu-emacs@gnu.org; Sun, 27 May 2012 09:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 May 2012 13:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7533 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7533-submit@debbugs.gnu.org id=B7533.133812495521481 (code B ref 7533); Sun, 27 May 2012 13:23:02 +0000 Original-Received: (at 7533) by debbugs.gnu.org; 27 May 2012 13:22:35 +0000 Original-Received: from localhost ([127.0.0.1]:45350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SYdQZ-0005aP-BM for submit@debbugs.gnu.org; Sun, 27 May 2012 09:22:35 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:39902) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SYdQW-0005aC-8Q for 7533@debbugs.gnu.org; Sun, 27 May 2012 09:22:33 -0400 Original-Received: (qmail invoked by alias); 27 May 2012 13:21:14 -0000 Original-Received: from 62-47-61-97.adsl.highway.telekom.at (EHLO [62.47.61.97]) [62.47.61.97] by mail.gmx.net (mp034) with SMTP; 27 May 2012 15:21:14 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX198DKtcMWZ8SP1uI9NZcrPoDfPKojywijlK0KBz4U pPBT8qX+Fcb2J6 In-Reply-To: <7783B19C74CD4DFAA1E6410A507A69C8@us.oracle.com> X-Y-GMX-Trusted: 0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:60397 Archived-At: >> IIUC your patch works regardless of the value of >> `frame-auto-hide-function'. The problem of your patch is that in >> (if (one-window-p) (delete-frame) (delete-window)) >> the window for showing the buffer may have been _reused_ in which case >> deleting is certainly the wrong solution. > > I do not understand how/why that window would or should be reused. When a user sets both `pop-up-frames' and `pop-up-windows' to nil, usually a window gets reused. If this is the only window on its frame and there are no other frames, the `delete-frame' call causes an error because it's within the scope of the `save-window-excursion'. > Especially between the time it becomes displayed and the end of the calling > function. The window is only for the user interaction of confirming (or not) > the operation on the marked files. > > The existing code seems to reflect this aim in that it uses > `save-window-excursion'. What is still missing is (a) deletion of the window or > frame (if `one-window-p') and (b) burial of the buffer. And this should happen > always, regardless of what the user does, including `C-g'. If the window was reused, the previous buffer should be shown. In practice, this is handled by the `save-window-excursion' unless a window on another frame gets reused. > If the buffer is not shown in a separate frame then the `save-window-excursion' > alone seems to remove/hide the window - great. And that is why more people are > not complaining about this regression, IMO. > > But if the buffer is shown in a separate frame (e.g. due to > `special-buffer-regexps') then `save-window-excursion' is simply not sufficient. > The frame remains displayed after the user interaction, regardless of what the > user does during the interaction (including `C-g'). > > Attached is a patch against the latest source code. AFAIK it DTRT. Can anyone > point to a reasonable situation where it does not DTRT - IOW, where what it does > is inappropriate? If not, can this please be installed for Emacs 24.1, to > eliminate this regression? Thx. Your new patch is better since it moves the frame deletion out of the scope of the window excursion. It's still not OK when a window on another frame gets reused but I think that use case can be ignored at the moment (it's neither provided by any of the stock buffer display functions nor is it handled by the present code anyway). martin