unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Drew Adams <drew.adams@oracle.com>
Cc: 7533@debbugs.gnu.org
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	[thread overview]
Message-ID: <4F7EF782.6020103@gmx.at> (raw)
In-Reply-To: <6119F1CF7E7141E28FA3CDF62C165B19@us.oracle.com>

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

 > 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

[-- Attachment #2: dired.diff --]
[-- Type: text/plain, Size: 1919 bytes --]

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



  reply	other threads:[~2012-04-06 14:02 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 18:35 bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' Drew Adams
2010-12-02 19:05 ` martin rudalics
2010-12-02 19:22   ` Drew Adams
2010-12-03  8:17     ` martin rudalics
2010-12-03 16:22       ` Drew Adams
2010-12-03 18:16         ` martin rudalics
2010-12-03 18:33           ` Drew Adams
2010-12-03 18:41             ` martin rudalics
2010-12-04 22:44               ` Chong Yidong
2010-12-16 18:27                 ` Drew Adams
2010-12-17  6:32                   ` martin rudalics
2010-12-17 15:32                     ` Drew Adams
2010-12-17 16:12                       ` martin rudalics
2010-12-17 16:55                         ` Drew Adams
2010-12-17 18:09                           ` martin rudalics
2010-12-17 18:40                             ` Drew Adams
2010-12-21  6:48                           ` Chong Yidong
2010-12-03 20:27       ` Stefan Monnier
2012-04-05 20:23         ` Drew Adams
2012-04-06 14:02           ` martin rudalics [this message]
2012-04-06 14:44             ` Drew Adams
2012-04-06 14:53               ` martin rudalics
2012-04-06 15:34                 ` Drew Adams
2012-04-06 15:47                   ` martin rudalics
2012-04-06 16:10                     ` Drew Adams
2012-04-06 16:56                       ` martin rudalics
2012-04-06 17:08                         ` Drew Adams
2012-04-18 14:32                           ` Drew Adams
2012-05-25 20:52                             ` Drew Adams
2012-05-26 17:55                               ` bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' [PATCH] Drew Adams
2012-05-27 13:21                                 ` martin rudalics
2012-05-27 14:33                                   ` Drew Adams
2011-01-18 22:14 ` bug#7533: 24.0.50; `dired-mark-pop-up': delete frame afterwards if `pop-up-frames' Drew Adams
2012-09-05 14:30 ` martin rudalics
2012-09-05 14:33   ` Drew Adams
2012-10-03  9:11     ` martin rudalics
2012-10-03 15:52     ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F7EF782.6020103@gmx.at \
    --to=rudalics@gmx.at \
    --cc=7533@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).