GNU bug report logs -
#17554
24.3.91; [Regression] re-usage of dired *Marked Files* buffer window
Previous Next
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 #56 received at 17554 <at> debbugs.gnu.org (full text, mbox):
>> > Am I missing something?
>>
>> This is how `display-buffer-use-some-window' works:
>> it calls `get-lru-window' to get the least recently used window
>> which is `*Marked Files*' in this case.
>
> I see. Thanks for your efforts to get this fixed.
While the latest patch with `display-buffer-at-bottom' provides a better
behavior for displaying *Completions*, I'm afraid it can't be installed
into emacs-24 branch because it changes the behavior of *Completions*
instead of just fixing the regression.
Since `get-lru-window' has a higher precedence than `get-largest-window'
in `display-buffer-use-some-window', we need to find a way to
mark the *Marked Files* window as dedicated to not use it
for displaying *Compilations*.
I tried to set `dedicated' in the window action alist:
=== modified file 'lisp/dired.el'
--- lisp/dired.el 2014-05-08 19:22:43 +0000
+++ lisp/dired.el 2014-06-10 00:02:14 +0000
@@ -3104,7 +3104,8 @@ (defun dired-mark-pop-up (buffer-or-name
(with-current-buffer-window
buffer
(cons 'display-buffer-below-selected
- '((window-height . fit-window-to-buffer)))
+ '((window-height . fit-window-to-buffer)
+ (dedicated . t)))
#'(lambda (window _value)
(with-selected-window window
(unwind-protect
but this doesn't seem to work. Then I found a workable solution:
=== modified file 'lisp/dired.el'
--- lisp/dired.el 2014-05-08 19:22:43 +0000
+++ lisp/dired.el 2014-06-10 00:08:38 +0000
@@ -3099,7 +3099,11 @@ (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*")))
+ (temp-buffer-window-show-hook
+ (cons (lambda ()
+ (set-window-dedicated-p window t))
+ temp-buffer-window-show-hook)))
(with-current-buffer buffer
(with-current-buffer-window
buffer
But it's too ugly and produces compilation warning
"reference to free variable `window'".
Maybe Martin has better ideas?
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.