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#1806: dired-pop-to-buffer in wrong place Date: Fri, 28 Sep 2012 12:38:37 +0300 Organization: JURTA Message-ID: <87bogqbgci.fsf@mail.jurta.org> References: <87r63gzcap.fsf@jurta.org> <505DBC23.5040907@gmx.at> <87y5k1lhn6.fsf@mail.jurta.org> <505ED4BB.3030103@gmx.at> <87txunj0ej.fsf@mail.jurta.org> <50602A8D.6010203@gmx.at> <8739261q8h.fsf@mail.jurta.org> <5061807D.1010401@gmx.at> <87pq59z3nr.fsf@mail.jurta.org> <5062C173.3050402@gmx.at> <87r4ppxfgm.fsf@mail.jurta.org> <5062E0FA.50701@gmx.at> <87sja3rj1p.fsf@mail.jurta.org> <50648DAF.5070409@gmx.at> <87d317l15d.fsf@mail.jurta.org> <50654463.2010008@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1348828253 19496 80.91.229.3 (28 Sep 2012 10:30:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2012 10:30:53 +0000 (UTC) Cc: 1806@debbugs.gnu.org To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Sep 28 12:30:53 2012 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 1THXok-0004lH-SL for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Sep 2012 12:29:11 +0200 Original-Received: from localhost ([::1]:50128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THXof-00078I-LP for geb-bug-gnu-emacs@m.gmane.org; Fri, 28 Sep 2012 06:29:05 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THXoa-000784-0X for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2012 06:29:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1THXoT-00032R-9U for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2012 06:28:59 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1THXoT-00031f-5h for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2012 06:28:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1THXob-0001XB-KG for bug-gnu-emacs@gnu.org; Fri, 28 Sep 2012 06:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Sep 2012 10:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 1806 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 1806-submit@debbugs.gnu.org id=B1806.13488281275867 (code B ref 1806); Fri, 28 Sep 2012 10:29:01 +0000 Original-Received: (at 1806) by debbugs.gnu.org; 28 Sep 2012 10:28:47 +0000 Original-Received: from localhost ([127.0.0.1]:59818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THXoN-0001Wa-25 for submit@debbugs.gnu.org; Fri, 28 Sep 2012 06:28:47 -0400 Original-Received: from ps18281.dreamhost.com ([69.163.218.105]:35660 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1THXoB-0001W5-FP for 1806@debbugs.gnu.org; Fri, 28 Sep 2012 06:28:45 -0400 Original-Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 43B46451CD3F; Fri, 28 Sep 2012 03:28:14 -0700 (PDT) In-Reply-To: <50654463.2010008@gmx.at> (martin rudalics's message of "Fri, 28 Sep 2012 08:32:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) 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:64976 Archived-At: >> The problem is that it steals space when the upper window is large > > ... I suppose you mean "when the upper window is small" here ... When a window has 30 lines in height, I call it "large" :-) > IIUC `fit-window-to-buffer' always tried to display as much as possible > within limits imposed, for example, by `temp-buffer-max-height'. Can > you tell me when and where it restricted itself to just some area of the > frame? I'll try to provide the exact details: 1. When the Dired window is small (less than 7 lines in height), there is no problem because it reuses the lower window. 2. When the Dired window is large (more than 7 lines in height) and a list of marked files is small: 2.1. When `window-combination-limit' is nil, the result of `dired-mark-pop-up' is horribly ugly (when `temp-buffer-resize-mode' is enabled). But thank you `window-combination-limit' is not nil anymore, so there is no problem now. 2.2. When `window-combination-limit' is non-nil, the result is still bad looking because `fit-window-to-buffer' is missing like in the original version of `dired-pop-to-buffer'. This is a regression. 2.3. When a list of files is too large to fit into split windows, it resizes the lower window. What I misremembered is that actually it never tried to avoid resizing the lower window. Sorry for my amnesia. This is not a regression. Its result looks like when `window-combination-limit' is nil, but since a large list of files is rarely displayed in Dired, this is a minor problem. So the main problem that remains is the need to use `fit-window-to-buffer'. I see three possible variants to fix this: 1. Call `fit-window-to-buffer' directly in `dired-mark-pop-up'. 2. Call `fit-window-to-buffer' in `display-buffer-below-selected' using a new action specifier. 3. Enable `temp-buffer-resize-mode'.