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, 17 Jun 2014 09:44:19 +0300 Organization: JURTA Message-ID: <87y4wwujb0.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> <87sind4npv.fsf@mail.jurta.org> <5396A087.6090606@gmx.at> <874mzs8jad.fsf@mail.jurta.org> <539801FA.2040400@gmx.at> <87vbs6r61k.fsf@mail.jurta.org> <87fvj5fq8q.fsf@mail.jurta.org> <19028.48992.2350.21407@gargle.gargle.HOWL> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1402987831 23386 80.91.229.3 (17 Jun 2014 06:50:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Jun 2014 06:50:31 +0000 (UTC) Cc: 17554@debbugs.gnu.org, Roland Winkler To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 17 08:50: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 1WwnDr-0003L0-9h for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jun 2014 08:50:23 +0200 Original-Received: from localhost ([::1]:47689 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwnDq-0003up-DB for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jun 2014 02:50:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43594) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwnDf-0003u9-PA for bug-gnu-emacs@gnu.org; Tue, 17 Jun 2014 02:50:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WwnDY-00055z-6b for bug-gnu-emacs@gnu.org; Tue, 17 Jun 2014 02:50:11 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58746) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WwnDY-00055B-4D for bug-gnu-emacs@gnu.org; Tue, 17 Jun 2014 02:50:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WwnDW-0004um-V7 for bug-gnu-emacs@gnu.org; Tue, 17 Jun 2014 02:50:03 -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, 17 Jun 2014 06:50: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.140298774618817 (code B ref 17554); Tue, 17 Jun 2014 06:50:02 +0000 Original-Received: (at 17554) by debbugs.gnu.org; 17 Jun 2014 06:49:06 +0000 Original-Received: from localhost ([127.0.0.1]:49896 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WwnCb-0004tQ-Hw for submit@debbugs.gnu.org; Tue, 17 Jun 2014 02:49:05 -0400 Original-Received: from alc-vshost7.dreamhost.com ([69.163.216.107]:46884 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WwnCM-0004sg-SG for 17554@debbugs.gnu.org; Tue, 17 Jun 2014 02:49:04 -0400 Original-Received: from localhost.jurta.org (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 772D632302F6C9; Mon, 16 Jun 2014 23:48:48 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 16 Jun 2014 17:47:42 -0400") 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:90463 Archived-At: >> 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.