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' Date: Fri, 06 Apr 2012 16:02:42 +0200 Message-ID: <4F7EF782.6020103@gmx.at> References: <90E09641E9264B37932D2315E5E7E2EA@us.oracle.com><4CF7EDED.5090500@gmx.at><44FB8E26FD824BB18AE8A367F560C091@us.oracle.com><4CF8A7B2.5080306@gmx.at> <6119F1CF7E7141E28FA3CDF62C165B19@us.oracle.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------090602020900010307020204" X-Trace: dough.gmane.org 1333724087 30257 80.91.229.3 (6 Apr 2012 14:54:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 6 Apr 2012 14:54:47 +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 Fri Apr 06 16:54:46 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 1SGAYo-0005nn-7f for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Apr 2012 16:54:46 +0200 Original-Received: from localhost ([::1]:40375 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGANl-0003cW-Eg for geb-bug-gnu-emacs@m.gmane.org; Fri, 06 Apr 2012 10:43:21 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:37283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGANg-0003cC-EV for bug-gnu-emacs@gnu.org; Fri, 06 Apr 2012 10:43:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGANb-0001un-OB for bug-gnu-emacs@gnu.org; Fri, 06 Apr 2012 10:43:16 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGANb-0001ui-KS for bug-gnu-emacs@gnu.org; Fri, 06 Apr 2012 10:43:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SG9li-0002NP-AQ for bug-gnu-emacs@gnu.org; Fri, 06 Apr 2012 10:04: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: Fri, 06 Apr 2012 14:04: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.13337210209108 (code B ref 7533); Fri, 06 Apr 2012 14:04:02 +0000 Original-Received: (at 7533) by debbugs.gnu.org; 6 Apr 2012 14:03:40 +0000 Original-Received: from localhost ([127.0.0.1]:42689 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SG9lK-0002Mp-MQ for submit@debbugs.gnu.org; Fri, 06 Apr 2012 10:03:40 -0400 Original-Received: from mailout-de.gmx.net ([213.165.64.22]:51147) by debbugs.gnu.org with smtp (Exim 4.72) (envelope-from ) id 1SG9lE-0002MZ-EK for 7533@debbugs.gnu.org; Fri, 06 Apr 2012 10:03:37 -0400 Original-Received: (qmail invoked by alias); 06 Apr 2012 14:02:47 -0000 Original-Received: from 62-47-43-205.adsl.highway.telekom.at (EHLO [62.47.43.205]) [62.47.43.205] by mail.gmx.net (mp028) with SMTP; 06 Apr 2012 16:02:47 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX197EkUeUk57dgAy4aqsjESs2U/eLfORcWphyn6i/f PXndq5Z45BnF9j In-Reply-To: <6119F1CF7E7141E28FA3CDF62C165B19@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:58558 Archived-At: This is a multi-part message in MIME format. --------------090602020900010307020204 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit > emacs -Q > > (setq special-display-regexps '("[ ]?[*][^*]+[*]")) > (setq pop-up-frame t) I suppose you mean (setq pop-up-frames t) but apparently this variable is no more supported by `display-buffer' (I'm not sure whether that's by design). > C-x d whatever-dir > > Mark 4 files for deletion. Hit `x'. Answer `yes'. > > The *Deletions* frame remains displayed. Would the attached patch fix it? This is NOT a generic fix - it might fail miserably if the buffer in question is shown in two windows simultaneously. Apparently this is no great issue in the case at hand since `dired-pop-to-buffer' already calls `get-buffer-window'. I earlier provided a variable called `display-buffer-window' for this and related issues but Stefan didn't like it. martin --------------090602020900010307020204 Content-Type: text/plain; name="dired.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="dired.diff" bzr diff === modified file 'lisp/dired.el' --- lisp/dired.el 2012-04-01 02:44:24 +0000 +++ lisp/dired.el 2012-04-06 13:35:09 +0000 @@ -2950,8 +2950,7 @@ ;; that's possible. (Bug#1806) (split-window-below)) ;; Otherwise, try to split WINDOW sensibly. - (split-window-sensibly window)))) - pop-up-frames) + (split-window-sensibly window))))) (pop-to-buffer (get-buffer-create buf))) ;; If dired-shrink-to-fit is t, make its window fit its contents. (when dired-shrink-to-fit @@ -2993,17 +2992,21 @@ ;; If FILES defaulted to the current line's file. (= (length files) 1)) (apply function args) - (with-current-buffer (get-buffer-create bufname) - (erase-buffer) - ;; Handle (t FILE) just like (FILE), here. - ;; That value is used (only in some cases), to mean - ;; just one file that was marked, rather than the current line file. - (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files)) - (remove-text-properties (point-min) (point-max) - '(mouse-face nil help-echo nil))) - (save-window-excursion - (dired-pop-to-buffer bufname) - (apply function args)))) + (let ((buffer (get-buffer-create bufname))) + (with-current-buffer buffer + (erase-buffer) + ;; Handle (t FILE) just like (FILE), here. + ;; That value is used (only in some cases), to mean + ;; just one file that was marked, rather than the current line file. + (dired-format-columns-of-files (if (eq (car files) t) (cdr files) files)) + (remove-text-properties (point-min) (point-max) + '(mouse-face nil help-echo nil)) + (dired-pop-to-buffer buffer) + (let ((window (get-buffer-window buffer))) + (prog1 + (apply function args) + (when (and window (eq (window-buffer window) buffer)) + (quit-window nil window)))))))) (defun dired-format-columns-of-files (files) (let ((beg (point))) --------------090602020900010307020204--