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 #71 received at 17554 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: martin rudalics <rudalics <at> gmx.at>
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: Mon, 16 Jun 2014 09:51:17 +0300
>> But the 24.3 code handles Roland's scenario by displaying *Completions*
>> in a third window.  At least it does so here.  What do you get?
>
> 24.3 displays *Completions* in the window with the dired buffer
> because the lru-window is the dired window in 24.3, but in 24.4
> the lru-window is the small window with *Marked Files*.
>
> Maybe it's possible to change window's timestamp after displaying
> *Marked Files* to make the dired window lru, to display *Completions*
> in it like in 24.3?

The problem is that `with-selected-window' calls `select-window' with
the non-nil arg `norecord' that doesn't update the window's use_time,
so the displayed window considered least-recently used.

I don't know how general this problem is, but at least for *Marked files*
the following patch causes the Dired window to be least-recently used,
thus avoiding using *Marked files* window to display *Completions*:

=== modified file 'lisp/dired.el'
--- lisp/dired.el	2014-05-08 19:22:43 +0000
+++ lisp/dired.el	2014-06-16 06:45:18 +0000
@@ -3107,6 +3107,7 @@ (defun dired-mark-pop-up (buffer-or-name
 	       '((window-height . fit-window-to-buffer)))
 	 #'(lambda (window _value)
 	     (with-selected-window window
+	       (select-window window) ;; use nil NORECORD to make window the most recently selected.
 	       (unwind-protect
 		   (apply function args)
 		 (when (window-live-p window)





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.