GNU bug report logs - #17554
24.3.91; [Regression] re-usage of dired *Marked Files* buffer window

Previous Next

Package: emacs;

Reported by: "Roland Winkler" <winkler <at> gnu.org>

Date: Thu, 22 May 2014 20:01:02 UTC

Severity: normal

Found in version 24.3.91

Done: Juri Linkov <juri <at> jurta.org>

Bug is archived. No further changes may be made.

Full log


Message #80 received at 17554 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 17554 <at> debbugs.gnu.org, Roland Winkler <winkler <at> gnu.org>
Subject: Re: bug#17554: 24.3.91;
 [Regression] re-usage of dired *Marked Files* buffer window
Date: Tue, 17 Jun 2014 09:44:19 +0300
>> We need two temp buffers like *Marked files* (small) and
>> *Completions* (bigger) for this bug to show up.
>
> FWIW, I think the right way to handle this case is to mark the window
> displaying *Marked files* as "dedicated".

This is achieved in this patch by binding `display-buffer-mark-dedicated'
to the same value 'soft' as in `minibuffer-completion-help' used
to display *Completions*.

Also I noticed that everywhere in code only `soft' is used instead of `softly'
that is suggested in window.el, so documentation could be fixed as well.

=== modified file 'lisp/dired.el'
--- lisp/dired.el	2014-05-08 19:22:43 +0000
+++ lisp/dired.el	2014-06-17 06:42:52 +0000
@@ -3099,7 +3099,10 @@ (defun dired-mark-pop-up (buffer-or-name
 	  ;; If FILES defaulted to the current line's file.
 	  (= (length files) 1))
       (apply function args)
-    (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*"))))
+    (let ((buffer (get-buffer-create (or buffer-or-name " *Marked Files*")))
+	  ;; Mark *Marked Files* as softly-dedicated, to prevent other
+	  ;; new windows e.g. *Completions* from reusing it (bug#17554).
+	  (display-buffer-mark-dedicated 'soft))
       (with-current-buffer buffer
 	(with-current-buffer-window
 	 buffer

=== modified file 'lisp/window.el'
--- lisp/window.el	2014-06-03 12:38:17 +0000
+++ lisp/window.el	2014-06-17 06:42:19 +0000
@@ -5966,7 +5966,7 @@ (defun window--maybe-raise-frame (frame)
 ;; FIXME: By the way, there could be more levels of dedication:
 ;; - `barely' dedicated doesn't prevent reuse of the window, only records that
 ;;   the window hasn't been used for something else yet.
-;; - `softly' dedicated only allows reuse when asked explicitly.
+;; - `soft' dedicated only allows reuse when asked explicitly.
 ;; - `strongly' never allows reuse.
 (defvar display-buffer-mark-dedicated nil
   "If non-nil, `display-buffer' marks the windows it creates as dedicated.





This bug report was last modified 10 years and 346 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.