From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#17554: 24.3.91; [Regression] re-usage of dired *Marked Files* buffer window Date: Tue, 10 Jun 2014 03:12:08 +0300 Organization: JURTA Message-ID: <87sind4npv.fsf@mail.jurta.org> References: <22309.78500.835208.21374@gargle.gargle.HOWL> <44983.87719.904757.21374@gargle.gargle.HOWL> <537EF7A7.8040608@gmx.at> <87ioowmb9v.fsf@mail.jurta.org> <8738fu51ld.fsf@mail.jurta.org> <5541.86351.568913.21381@gargle.gargle.HOWL> <87k38u52o5.fsf@mail.jurta.org> <16581.64879.470025.21393@gargle.gargle.HOWL> <87r431prk5.fsf@mail.jurta.org> <56744.21680.858077.21397@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402360171 2028 80.91.229.3 (10 Jun 2014 00:29:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Jun 2014 00:29:31 +0000 (UTC) Cc: 17554@debbugs.gnu.org To: "Roland Winkler" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 10 02:29:24 2014 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 1Wu9wI-0003Ex-5Z for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Jun 2014 02:29:22 +0200 Original-Received: from localhost ([::1]:35733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu9wH-00021U-GZ for geb-bug-gnu-emacs@m.gmane.org; Mon, 09 Jun 2014 20:29:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35835) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu9w6-0001zR-RD for bug-gnu-emacs@gnu.org; Mon, 09 Jun 2014 20:29:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wu9vz-0002tu-Ap for bug-gnu-emacs@gnu.org; Mon, 09 Jun 2014 20:29:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wu9vz-0002tH-8F for bug-gnu-emacs@gnu.org; Mon, 09 Jun 2014 20:29:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wu9vy-0004Bx-IS for bug-gnu-emacs@gnu.org; Mon, 09 Jun 2014 20:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Jun 2014 00:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17554 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17554-submit@debbugs.gnu.org id=B17554.140236012716083 (code B ref 17554); Tue, 10 Jun 2014 00:29:02 +0000 Original-Received: (at 17554) by debbugs.gnu.org; 10 Jun 2014 00:28:47 +0000 Original-Received: from localhost ([127.0.0.1]:42263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wu9vj-0004BK-89 for submit@debbugs.gnu.org; Mon, 09 Jun 2014 20:28:47 -0400 Original-Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:43453 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wu9vg-0004B6-97 for 17554@debbugs.gnu.org; Mon, 09 Jun 2014 20:28:45 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id AA044315F84BDE; Mon, 9 Jun 2014 17:28:41 -0700 (PDT) In-Reply-To: <56744.21680.858077.21397@gargle.gargle.HOWL> (Roland Winkler's message of "Mon, 9 Jun 2014 11:15:36 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:90205 Archived-At: >> > 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?