From stephen.berman@gmx.net Thu Dec 4 01:44:23 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.0 required=4.0 tests=BAYES_00,MURPHY_DRUGS_REL8, RCVD_IN_DNSWL_MED autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Dec 2008 09:44:23 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB49iJM7013570 for ; Thu, 4 Dec 2008 01:44:21 -0800 Received: from mail.gnu.org ([199.232.76.166]:58084 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L8AkQ-0000TD-VK for emacs-pretest-bug@gnu.org; Thu, 04 Dec 2008 04:43:51 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L8Akq-0004JT-Fz for emacs-pretest-bug@gnu.org; Thu, 04 Dec 2008 04:44:18 -0500 Received: from mail.gmx.net ([213.165.64.20]:54300) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1L8Akp-0004JA-MU for emacs-pretest-bug@gnu.org; Thu, 04 Dec 2008 04:44:16 -0500 Received: (qmail invoked by alias); 04 Dec 2008 09:44:13 -0000 Received: from i59F558DC.versanet.de (EHLO escher.local.home) [89.245.88.220] by mail.gmx.net (mp025) with SMTP; 04 Dec 2008 10:44:13 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX1/NGFNr8N7NDL9WOtlKqby9n1JW8TEtQU27dZYN89 G05ZVNVvcCRZ95 Received: by escher.local.home (Postfix, from userid 1000) id B140B7FF56; Thu, 4 Dec 2008 10:44:12 +0100 (CET) From: Stephen Berman To: emacs-pretest-bug@gnu.org Subject: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer Sender: steve@escher.local.home Date: Thu, 04 Dec 2008 10:44:12 +0100 Message-ID: <87fxl446mr.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.54,0.78 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. --=-=-= In GNU Emacs 23.0.60.21 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2008-12-03 on escher 1. emacs -Q 2. Eval this: (define-minor-mode my-mm () "My minor mode." :global t (if my-mm (setq default-header-line-format '(:eval (propertize "test" 'face '(:overline t)))) (setq default-header-line-format nil))) 3. Enable my-mm. 4. C-x d foo (where `foo' is some directory with at least three files, e.g. emacs/lisp). 5. Mark three files in foo. 6. Type `C' ==> The popped up buffer *Marked Files* shows only two of the three marked files. Likewise if the value of the 'face property in my-mm has a non-nil :box attribute. In contrast, if the value of the 'face property is '(:underline t) (but not '(:underline t :overline t)), then in step 6 all three marked files are shown, though with no room to spare. I guess the basic problem here is that Emacs calculates window-height in integral equally sized line numbers. But less fundamentally and more directly, this problem arises, AFAICT, because dired-pop-to-buffer's shrink-to-fit code fails to account for header lines. To fix this it would suffice to add this sexp above the last sexp in dired-pop-to-buffer: (with-current-buffer buf (and header-line-format (progn (select-window w2) (enlarge-window 1)))) However, unless I'm missing something, fit-window-to-buffer does what dired-pop-to-buffer's shrink-to-fit code does, and moreover also handles header lines. From perusing the change logs, I found several instances where fit-window-to-buffer replaces library-specific code, and this appears to be another candidate (dired-pop-to-buffer was introduced many years before fit-window-to-buffer), in addition to fixing the above bug. I'm not able to fix the display code to let window-height return fractional line numbers, so I propose the following patch: --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Description: dired-pop-to-buffer patch *** emacs/lisp/dired.el.~1.414.~ 2008-12-03 10:17:51.000000000 +0100 --- emacs/lisp/dired.el 2008-12-04 10:11:05.000000000 +0100 *************** *** 2678,2721 **** (defun dired-pop-to-buffer (buf) ;; Pop up buffer BUF. ;; If dired-shrink-to-fit is t, make its window fit its contents. ! (if (not dired-shrink-to-fit) ! (pop-to-buffer (get-buffer-create buf)) ! ;; let window shrink to fit: ! (let ((window (selected-window)) ! target-lines w2) ! (cond ;; if split-height-threshold is enabled, use the largest window ! ((and (> (window-height (setq w2 (get-largest-window))) ! split-height-threshold) ! (window-full-width-p w2)) ! (setq window w2)) ! ;; if the least-recently-used window is big enough, use it ! ((and (> (window-height (setq w2 (get-lru-window))) ! (* 2 window-min-height)) ! (window-full-width-p w2)) ! (setq window w2))) ! (save-excursion ! (set-buffer buf) ! (goto-char (point-max)) ! (skip-chars-backward "\n\r\t ") ! (setq target-lines (count-lines (point-min) (point))) ! ;; Don't forget to count the last line. ! (if (not (bolp)) ! (setq target-lines (1+ target-lines)))) ! (if (<= (window-height window) (* 2 window-min-height)) ! ;; At this point, every window on the frame is too small to split. ! (setq w2 (display-buffer buf)) ! (setq w2 (split-window window ! (max window-min-height ! (- (window-height window) ! (1+ (max window-min-height target-lines))))))) ! (set-window-buffer w2 buf) ! (if (< (1- (window-height w2)) target-lines) ! (progn ! (select-window w2) ! (enlarge-window (- target-lines (1- (window-height w2)))))) ! (set-window-start w2 1) ! ))) (defcustom dired-no-confirm nil "A list of symbols for commands Dired should not confirm. --- 2678,2687 ---- (defun dired-pop-to-buffer (buf) ;; Pop up buffer BUF. + (pop-to-buffer (get-buffer-create buf)) ;; If dired-shrink-to-fit is t, make its window fit its contents. ! (when dired-shrink-to-fit ! (fit-window-to-buffer (get-buffer-window buf)))) (defcustom dired-no-confirm nil "A list of symbols for commands Dired should not confirm. --=-=-= (Note that if the frame is shrunk so that not all marked file names fit in the *Marked Files* window, then without an oversized header line as is my-mm, dired-pop-to-buffer fails with the error "Attempt to delete minibuffer or sole ordinary window"; whereas with an oversized header line, this error is raised only if not even one file name can be shown. But I see this difference in behavior whether or not the above patch is applied.) Steve Berman --=-=-=-- From drew.adams@oracle.com Thu Dec 4 09:24:15 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-8.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at submit) by emacsbugs.donarmstrong.com; 4 Dec 2008 17:24:15 +0000 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id mB4HOCUn002312 for ; Thu, 4 Dec 2008 09:24:13 -0800 Received: from mail.gnu.org ([199.232.76.166]:47671 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1L8HvT-0000lo-LX for emacs-pretest-bug@gnu.org; Thu, 04 Dec 2008 12:23:43 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1L8Hvu-0004FH-97 for emacs-pretest-bug@gnu.org; Thu, 04 Dec 2008 12:24:11 -0500 Received: from rcsinet12.oracle.com ([148.87.113.124]:59948 helo=rgminet12.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L8Hvt-0004F3-Sx for emacs-pretest-bug@gnu.org; Thu, 04 Dec 2008 12:24:10 -0500 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mB4HNkMI017580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 4 Dec 2008 17:23:48 GMT Received: from acsmt705.oracle.com (acsmt705.oracle.com [141.146.40.83]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mB4HO3Yb014656; Thu, 4 Dec 2008 17:24:04 GMT Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 04 Dec 2008 09:23:55 -0800 From: "Drew Adams" To: "'Stephen Berman'" , <1488@debbugs.gnu.org>, References: <87fxl446mr.fsf@escher.local.home> Subject: RE: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer Date: Thu, 4 Dec 2008 09:23:57 -0800 Message-ID: <010101c95635$1812f200$c2b22382@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87fxl446mr.fsf@escher.local.home> Thread-Index: AclWJIb4wR2aGf+bSVSxUg45OzKGzQAD+IVA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: acsmt705.oracle.com [141.146.40.83] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A09020B.4938122D.00A8:SCFSTAT928724,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-CrossAssassin-Score: 2 > From: Stephen Berman Sent: Thursday, December 04, 2008 1:44 AM > In GNU Emacs 23.0.60.21 (i686-pc-linux-gnu, GTK+ Version 2.12.9) > of 2008-12-03 on escher > 1. emacs -Q > 2. Eval this: > (define-minor-mode my-mm () "My minor mode." :global t > (if my-mm > (setq default-header-line-format > '(:eval (propertize "test" 'face '(:overline t)))) > (setq default-header-line-format nil))) > 3. Enable my-mm. > 4. C-x d foo (where `foo' is some directory with at least three files, > e.g. emacs/lisp). > 5. Mark three files in foo. > 6. Type `C' > ==> The popped up buffer *Marked Files* shows only two of the three > marked files. > > Likewise if the value of the 'face property in my-mm has a > non-nil :box attribute. In contrast, if the value of the 'face > property is '(:underline t) (but not '(:underline t :overline t)), > then in step 6 all three marked files are shown, though with no room > to spare. > > I guess the basic problem here is that Emacs calculates > window-height in integral equally sized line numbers. I think so; yes. This seems related to this bug: http://lists.gnu.org/archive/html/emacs-devel/2007-03/msg00765.html. A face that uses :box, :overline, etc. is a pixel or two taller. And that can cause code that deals with window size to increase by another line. From rudalics@gmx.at Thu Dec 4 10:03:17 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 4 Dec 2008 18:03:17 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB4I3DOm012071 for <1488@emacsbugs.donarmstrong.com>; Thu, 4 Dec 2008 10:03:15 -0800 Received: (qmail invoked by alias); 04 Dec 2008 18:03:06 -0000 Received: from 88-117-47-114.adsl.highway.telekom.at (EHLO [88.117.47.114]) [88.117.47.114] by mail.gmx.net (mp063) with SMTP; 04 Dec 2008 19:03:06 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+3Hl1tgZa3+ikxVRpWGAGO8mq98//j9DiucpQ8q9 3eyZ1QMKLSe2eR Message-ID: <49381A5F.6070902@gmx.at> Date: Thu, 04 Dec 2008 18:58:55 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> In-Reply-To: <87fxl446mr.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.71 > However, unless I'm missing something, fit-window-to-buffer does what > dired-pop-to-buffer's shrink-to-fit code does, and moreover also handles > header lines. In addition we have the problem that `split-height-threshold' can be now nil in ((and (> (window-height (setq w2 (get-largest-window))) split-height-threshold) > I'm not able to fix the display code to let window-height return > fractional line numbers, so I propose the following patch: If there are no objections, I'll commit that in a couple of days. > (Note that if the frame is shrunk so that not all marked file names fit > in the *Marked Files* window, then without an oversized header line as > is my-mm, dired-pop-to-buffer fails with the error "Attempt to delete > minibuffer or sole ordinary window"; whereas with an oversized header > line, this error is raised only if not even one file name can be shown. > But I see this difference in behavior whether or not the above patch is > applied.) I cannot reproduce that here. That is, marking in a dired buffer more files than there fit on the frame and typing C gives me a single-window frame here with some files not shown - no error. martin From rudalics@gmx.at Thu Dec 4 10:35:32 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.9 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 4 Dec 2008 18:35:32 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB4IZSQV021517 for <1488@emacsbugs.donarmstrong.com>; Thu, 4 Dec 2008 10:35:30 -0800 Received: (qmail invoked by alias); 04 Dec 2008 18:35:19 -0000 Received: from 88-117-47-114.adsl.highway.telekom.at (EHLO [88.117.47.114]) [88.117.47.114] by mail.gmx.net (mp025) with SMTP; 04 Dec 2008 19:35:19 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18hPDRTMnkhMKu2JvZeABJsAKxKi+kvGz4Ydf34Fi pgMta3MWzPOJFF Message-ID: <4938226B.5040003@gmx.at> Date: Thu, 04 Dec 2008 19:33:15 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <49381A5F.6070902@gmx.at> In-Reply-To: <49381A5F.6070902@gmx.at> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.8 > I cannot reproduce that here. That is, marking in a dired buffer more > files than there fit on the frame and typing C gives me a single-window > frame here with some files not shown - no error. Ah, I can reproduce that now - but not reliably. I have to debug this - I even managed to get a frame with no modeline either :-( martin From rudalics@gmx.at Fri Dec 5 06:28:32 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 5 Dec 2008 14:28:32 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB5ESSaS014275 for <1488@emacsbugs.donarmstrong.com>; Fri, 5 Dec 2008 06:28:30 -0800 Received: (qmail invoked by alias); 05 Dec 2008 14:28:22 -0000 Received: from 62-47-49-168.adsl.highway.telekom.at (EHLO [62.47.49.168]) [62.47.49.168] by mail.gmx.net (mp059) with SMTP; 05 Dec 2008 15:28:22 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1/iVmltnfDiBnkiMqs+s/R/eCo4lUda/RFthE/bn4 M7MEhuRljIwlk3 Message-ID: <493939C0.7010507@gmx.at> Date: Fri, 05 Dec 2008 15:25:04 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> In-Reply-To: <87fxl446mr.fsf@escher.local.home> Content-Type: multipart/mixed; boundary="------------050806030106040005070208" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.8,0.62 This is a multi-part message in MIME format. --------------050806030106040005070208 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Stephen, `fit-window-to-buffer' seems broken in a number of regards. I'll eventually put condition-cases around the `enlarge-window' calls. Could you, so far, try whether the attached patch improves things. Thanks, martin. --------------050806030106040005070208 Content-Type: text/plain; name="window.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="window.el.diff" *** window.el.~1.169.~ 2008-11-27 11:14:14.671875000 +0100 --- window.el 2008-12-05 15:22:20.281250000 +0100 *************** *** 1307,1313 **** (when (null window) (setq window (selected-window))) (when (null max-height) ! (setq max-height (frame-height (window-frame window)))) (let* ((buf ;; Buffer that is displayed in WINDOW --- 1307,1313 ---- (when (null window) (setq window (selected-window))) (when (null max-height) ! (setq max-height (- (frame-height (window-frame window)) 1))) (let* ((buf ;; Buffer that is displayed in WINDOW *************** *** 1334,1341 **** (delta ;; Calculate how much the window height has to change to show ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. ! (- (max (min desired-height max-height) ! (or min-height window-min-height)) window-height))) ;; Don't try to redisplay with the cursor at the end --- 1334,1341 ---- (delta ;; Calculate how much the window height has to change to show ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. ! (- (min max-height ! (max desired-height (or min-height window-min-height))) window-height))) ;; Don't try to redisplay with the cursor at the end --------------050806030106040005070208-- From stephen.berman@gmx.net Fri Dec 5 09:27:31 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 5 Dec 2008 17:27:31 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB5HRReb027505 for <1488@emacsbugs.donarmstrong.com>; Fri, 5 Dec 2008 09:27:29 -0800 Received: (qmail invoked by alias); 05 Dec 2008 17:27:21 -0000 Received: from i59F557B6.versanet.de (EHLO escher.local.home) [89.245.87.182] by mail.gmx.net (mp056) with SMTP; 05 Dec 2008 18:27:21 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX192pSUKbA12IX28lKOxpsHf2Z/vIGcCLqPyKdwrTV HjnP8GkgxgHqKc Received: by escher.local.home (Postfix, from userid 1000) id 0F90D7FF56; Fri, 5 Dec 2008 18:27:20 +0100 (CET) From: Stephen Berman To: martin rudalics Cc: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <493939C0.7010507@gmx.at> Sender: steve@escher.local.home Date: Fri, 05 Dec 2008 18:27:20 +0100 In-Reply-To: <493939C0.7010507@gmx.at> (martin rudalics's message of "Fri, 05 Dec 2008 15:25:04 +0100") Message-ID: <87bpvqttvr.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 On Fri, 05 Dec 2008 15:25:04 +0100 martin rudalics wrote: > `fit-window-to-buffer' seems broken in a number of regards. I'll > eventually put condition-cases around the `enlarge-window' calls. > Could you, so far, try whether the attached patch improves things. You're referring to the parenthetical note below my patch, right? So I tested my patched version of dired-pop-to-buffer after applying your patch. The result is that dired-pop-to-buffer does not raise an error if I shrink the frame to a size too small to show all marked files, irrespective of the presence or absence of a header line; in both cases I can shrink the frame until only one file can be shown. That is, your patch makes the behavior of dired-pop-to-buffer (with my patch) uniformly like the behavior with a header line without your patch. Is that what you intend? Steve Berman From rudalics@gmx.at Fri Dec 5 09:39:36 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 5 Dec 2008 17:39:36 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB5HdWwp029978 for <1488@emacsbugs.donarmstrong.com>; Fri, 5 Dec 2008 09:39:34 -0800 Received: (qmail invoked by alias); 05 Dec 2008 17:39:27 -0000 Received: from 62-47-49-168.adsl.highway.telekom.at (EHLO [62.47.49.168]) [62.47.49.168] by mail.gmx.net (mp028) with SMTP; 05 Dec 2008 18:39:27 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX18LKloQujYLhn8GJNSqYJQI/bZIv/OBhS8crqJF6X 4XZcMGA2H2Cdo7 Message-ID: <493966D2.5050108@gmx.at> Date: Fri, 05 Dec 2008 18:37:22 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <493939C0.7010507@gmx.at> <87bpvqttvr.fsf@escher.local.home> In-Reply-To: <87bpvqttvr.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.75 > You're referring to the parenthetical note below my patch, right? Yes. > So I > tested my patched version of dired-pop-to-buffer after applying your > patch. The result is that dired-pop-to-buffer does not raise an error > if I shrink the frame to a size too small to show all marked files, > irrespective of the presence or absence of a header line; in both cases > I can shrink the frame until only one file can be shown. Isn't that what you wanted? > That is, your > patch makes the behavior of dired-pop-to-buffer (with my patch) > uniformly like the behavior with a header line without your patch. Is > that what you intend? I don't understand what you mean here. What I wanted to resolve in the first place was to make `fit-window-to-buffer' not issue an error when the frame is to small. Is there anything else that doesn't work? martin From stephen.berman@gmx.net Fri Dec 5 10:17:56 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-7.2 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER, MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 5 Dec 2008 18:17:56 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB5IHqlf007879 for <1488@emacsbugs.donarmstrong.com>; Fri, 5 Dec 2008 10:17:54 -0800 Received: (qmail invoked by alias); 05 Dec 2008 18:17:46 -0000 Received: from i59F557B6.versanet.de (EHLO escher.local.home) [89.245.87.182] by mail.gmx.net (mp024) with SMTP; 05 Dec 2008 19:17:46 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX184L3MOMeQ4b0PwRRYr0+9ZF+9/3UNiwoNOVxZKzB xph7Jt6gX9Xzr7 Received: by escher.local.home (Postfix, from userid 1000) id 6CC9F7FF56; Fri, 5 Dec 2008 19:17:46 +0100 (CET) From: Stephen Berman To: martin rudalics Cc: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <493939C0.7010507@gmx.at> <87bpvqttvr.fsf@escher.local.home> <493966D2.5050108@gmx.at> Sender: steve@escher.local.home Date: Fri, 05 Dec 2008 19:17:46 +0100 In-Reply-To: <493966D2.5050108@gmx.at> (martin rudalics's message of "Fri, 05 Dec 2008 18:37:22 +0100") Message-ID: <877i6etrjp.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.64 On Fri, 05 Dec 2008 18:37:22 +0100 martin rudalics wrote: >> You're referring to the parenthetical note below my patch, right? > > Yes. > >> So I >> tested my patched version of dired-pop-to-buffer after applying your >> patch. The result is that dired-pop-to-buffer does not raise an error >> if I shrink the frame to a size too small to show all marked files, >> irrespective of the presence or absence of a header line; in both cases >> I can shrink the frame until only one file can be shown. > > Isn't that what you wanted? I didn't mean to suggest either behavior was better or worse, I just wanted to report the observation. But I agree it certainly is better to have uniform behavior, and no error is fine with me (at least, the particular error message currently used in the no-header-line case seems inappropriate). >> That is, your >> patch makes the behavior of dired-pop-to-buffer (with my patch) >> uniformly like the behavior with a header line without your patch. Is >> that what you intend? > > I don't understand what you mean here. What I wanted to resolve in the > first place was to make `fit-window-to-buffer' not issue an error when > the frame is to small. That's exactly what I meant, and my question was just to be sure this was what you wanted to achieve. > Is there anything else that doesn't work? Not with fit-window-to-buffer, AFAICT. Steve Berman From rudalics@gmx.at Sat Dec 6 11:28:33 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Status: No, score=-6.2 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MIXEDBDN,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 6 Dec 2008 19:28:34 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB6JST1d002046 for <1488@emacsbugs.donarmstrong.com>; Sat, 6 Dec 2008 11:28:30 -0800 Received: (qmail invoked by alias); 06 Dec 2008 19:28:23 -0000 Received: from 62-47-55-164.adsl.highway.telekom.at (EHLO [62.47.55.164]) [62.47.55.164] by mail.gmx.net (mp069) with SMTP; 06 Dec 2008 20:28:23 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+NSMIGYsON1KxVijubEbifxTU5pmGEtDakGnw9/e vo3pkg1xdDquuD Message-ID: <493AD18C.6070002@gmx.at> Date: Sat, 06 Dec 2008 20:25:00 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <493939C0.7010507@gmx.at> <87bpvqttvr.fsf@escher.local.home> <493966D2.5050108@gmx.at> <877i6etrjp.fsf@escher.local.home> In-Reply-To: <877i6etrjp.fsf@escher.local.home> Content-Type: multipart/mixed; boundary="------------060004000107090304000808" X-Y-GMX-Trusted: 0 X-FuHaFi: 0.82,0.48 This is a multi-part message in MIME format. --------------060004000107090304000808 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Stephen, `fit-window-to-buffer' had more bugs than I thought. I rewrote it completely but you would have to use it for a couple of days to know whether it DTRT. Patch attached. martin --------------060004000107090304000808 Content-Type: text/plain; name="window.el.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="window.el.diff" *** window.el.~1.169.~ 2008-11-27 11:14:14.671875000 +0100 --- window.el 2008-12-06 20:20:34.390625000 +0100 *************** *** 1296,1379 **** "Adjust height of WINDOW to display its buffer's contents exactly. WINDOW defaults to the selected window. Optional argument MAX-HEIGHT specifies the maximum height of the ! window and defaults to the height of WINDOW's frame. Optional argument MIN-HEIGHT specifies the minimum height of the window and defaults to `window-min-height'. Both, MAX-HEIGHT and MIN-HEIGHT are specified in lines and include the mode line and header line, if any. Always return nil." (interactive) ! ! (when (null window) ! (setq window (selected-window))) ! (when (null max-height) ! (setq max-height (frame-height (window-frame window)))) ! ! (let* ((buf ! ;; Buffer that is displayed in WINDOW ! (window-buffer window)) ! (window-height ! ;; The current height of WINDOW ! (window-height window)) ! (desired-height ! ;; The height necessary to show the buffer displayed by WINDOW ! ;; (`count-screen-lines' always works on the current buffer). ! (with-current-buffer buf ! (+ (count-screen-lines) ! ;; If the buffer is empty, (count-screen-lines) is ! ;; zero. But, even in that case, we need one text line ! ;; for cursor. ! (if (= (point-min) (point-max)) ! 1 0) ! ;; For non-minibuffers, count the mode-line, if any ! (if (and (not (window-minibuffer-p window)) ! mode-line-format) ! 1 0) ! ;; Count the header-line, if any ! (if header-line-format 1 0)))) ! (delta ! ;; Calculate how much the window height has to change to show ! ;; desired-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. ! (- (max (min desired-height max-height) ! (or min-height window-min-height)) ! window-height))) ! ! ;; Don't try to redisplay with the cursor at the end ! ;; on its own line--that would force a scroll and spoil things. ! (when (with-current-buffer buf ! (and (eobp) (bolp) (not (bobp)))) ! (set-window-point window (1- (window-point window)))) ! ! (save-selected-window ! (select-window window 'norecord) ! ! ;; Adjust WINDOW to the nominally correct size (which may actually ! ;; be slightly off because of variable height text, etc). ! (unless (zerop delta) ! (enlarge-window delta)) ! ! ;; Check if the last line is surely fully visible. If not, ! ;; enlarge the window. ! (let ((end (with-current-buffer buf ! (save-excursion ! (goto-char (point-max)) ! (when (and (bolp) (not (bobp))) ! ;; Don't include final newline ! (backward-char 1)) ! (when truncate-lines ! ;; If line-wrapping is turned off, test the ! ;; beginning of the last line for visibility ! ;; instead of the end, as the end of the line ! ;; could be invisible by virtue of extending past ! ;; the edge of the window. ! (forward-line 0)) ! (point))))) ! (set-window-vscroll window 0) ! (while (and (< desired-height max-height) ! (= desired-height (window-height window)) ! (not (pos-visible-in-window-p end window))) ! (enlarge-window 1) ! (setq desired-height (1+ desired-height))))))) (defun window-safely-shrinkable-p (&optional window) "Return t if WINDOW can be shrunk without shrinking other windows. --- 1296,1383 ---- "Adjust height of WINDOW to display its buffer's contents exactly. WINDOW defaults to the selected window. Optional argument MAX-HEIGHT specifies the maximum height of the ! window and defaults to the maximum permissible height of a window ! on WINDOW's frame. Optional argument MIN-HEIGHT specifies the minimum height of the window and defaults to `window-min-height'. Both, MAX-HEIGHT and MIN-HEIGHT are specified in lines and include the mode line and header line, if any. Always return nil." (interactive) ! ;; Do all the work in WINDOW and its buffer and restore the selected ! ;; window and the current buffer when we're done. ! (save-excursion ! (with-selected-window (or window (selected-window)) ! (set-buffer (window-buffer)) ! (let* ((desired-height ! ;; The height necessary to show all of WINDOW's buffer. ! ;; For an empty buffer (count-screen-lines) returns zero. ! ;; Even in that case we need one line for the cursor. ! (+ (max (count-screen-lines) 1) ! ;; For non-minibuffers count the mode-line, if any. ! (if (and (not (window-minibuffer-p)) mode-line-format) 1 0) ! ;; Count the header-line, if any. ! (if header-line-format 1 0))) ! ;; MIN-HEIGHT must not be less than 1 and defaults to ! ;; `window-min-height'. ! (min-height (max (or min-height window-min-height) 1)) ! (max-window-height ! ;; Maximum height of any window on this frame. ! (min (window-height (frame-root-window)) (frame-height))) ! ;; MAX-HEIGHT must not be larger than max-window-height and ! ;; also defaults to that value. ! (max-height ! (min (or max-height max-window-height) max-window-height)) ! (delta ! ;; How much the window height has to change to show ! ;; desired-height lines, constrained by MIN-HEIGHT and ! ;; MAX-HEIGHT. ! (- (min max-height (max desired-height min-height)) ! (window-height))) ! ;; Avoid deleting this window if it becomes too small. As ! ;; a side-effect, this may keep some other windows as well. ! ! ;; Note: The following was removed by Jan on 2007-07-09 but ! ;; it seems needed to (1) avoid deleting the window we want ! ;; to shrink, and (2) as a consequence of (1) have ! ;; (window-height WINDOW) return the buffer displayed by ! ;; WINDOW which seems like a bug in delete_all_subwindows ! ;; which uses decode_any_window (so it doesn't care wether ! ;; WINDOW is live). ! (window-min-height 1)) ! ;; Don't try to redisplay with the cursor at the end on its own ! ;; line--that would force a scroll and spoil things. ! (when (and (eobp) (bolp) (not (bobp))) ! (set-window-point window (1- (window-point)))) ! ;; Use condition-case to handle any fixed-size windows and other ! ;; pitfalls nearby. ! (condition-case nil ! ;; Adjust WINDOW's height to the nominally correct one ! ;; (which may actually be slightly off because of variable ! ;; height text, etc). ! (unless (zerop delta) ! (enlarge-window delta) ! ;; Check if the last line is surely fully visible. If ! ;; not, enlarge the window. ! (let ((end (save-excursion ! (goto-char (point-max)) ! (when (and (bolp) (not (bobp))) ! ;; Don't include final newline ! (backward-char 1)) ! (when truncate-lines ! ;; If line-wrapping is turned off, test the ! ;; beginning of the last line for ! ;; visibility instead of the end, as the ! ;; end of the line could be invisible by ! ;; virtue of extending past the edge of the ! ;; window. ! (forward-line 0)) ! (point)))) ! (set-window-vscroll window 0) ! (while (and (< (window-height) max-height) ! (not (pos-visible-in-window-p end))) ! (enlarge-window 1)))) ! (error nil)))))) (defun window-safely-shrinkable-p (&optional window) "Return t if WINDOW can be shrunk without shrinking other windows. --------------060004000107090304000808-- From stephen.berman@gmx.net Tue Dec 9 12:15:38 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 20; hammy, 112; neutral, 48; spammy, 0. spammytokens: hammytokens:0.000-+--23.0.60, 0.000-+--23060, 0.000-+--H*M:fsf, 0.000-+--H*UA:Emacs, 0.000-+--H*u:Emacs X-Spam-Status: No, score=-7.1 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 9 Dec 2008 20:15:38 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mB9KFXoL028995 for <1488@emacsbugs.donarmstrong.com>; Tue, 9 Dec 2008 12:15:34 -0800 Received: (qmail invoked by alias); 09 Dec 2008 20:15:27 -0000 Received: from i59F545B9.versanet.de (EHLO escher.local.home) [89.245.69.185] by mail.gmx.net (mp047) with SMTP; 09 Dec 2008 21:15:27 +0100 X-Authenticated: #20778731 X-Provags-ID: V01U2FsdGVkX19x+LdSik5xjHNue60b4T9zWgxr//NhJFC7vyYuKL rGnbKKpcZ3vqht Received: by escher.local.home (Postfix, from userid 1000) id 95F0D7FF98; Tue, 9 Dec 2008 21:15:23 +0100 (CET) From: Stephen Berman To: martin rudalics Cc: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <493939C0.7010507@gmx.at> <87bpvqttvr.fsf@escher.local.home> <493966D2.5050108@gmx.at> <877i6etrjp.fsf@escher.local.home> <493AD18C.6070002@gmx.at> Sender: steve@escher.local.home Date: Tue, 09 Dec 2008 21:15:23 +0100 In-Reply-To: <493AD18C.6070002@gmx.at> (martin rudalics's message of "Sat, 06 Dec 2008 20:25:00 +0100") Message-ID: <87zlj5xfz8.fsf@escher.local.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Y-GMX-Trusted: 0 X-FuHaFi: 0.73 On Sat, 06 Dec 2008 20:25:00 +0100 martin rudalics wrote: > `fit-window-to-buffer' had more bugs than I thought. I rewrote it > completely but you would have to use it for a couple of days to know > whether it DTRT. Patch attached. I finally had time to apply your patch and give it a whirl. Initial tests together with my patched dired-pop-to-buffer indicate it DTRT, i.e., both with and without a header line I can shrink the frame and invoke dired-pop-to-buffer without signalling an error until only one dired line is displayable: then shrinking is no longer possible and dired-pop-to-buffer shows one file (also with signalling an error). I'll keep using it, maybe I'll hit a corner case, but it seems ok. Steve Berman From rudalics@gmx.at Thu Dec 11 01:59:36 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 37; hammy, 38; neutral, 36; spammy, 0. spammytokens: hammytokens:0.000-+--23060, 0.000-+--23.0.60, 0.000-+--UD:el, 0.000-+--HX-Spam-Relays-External:213.165.64.20, 0.000-+--H*RU:mail.gmx.net X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,HAS_BUG_NUMBER autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488-done) by emacsbugs.donarmstrong.com; 11 Dec 2008 09:59:36 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mBB9xWg6020342 for <1488-done@emacsbugs.donarmstrong.com>; Thu, 11 Dec 2008 01:59:34 -0800 Received: (qmail invoked by alias); 11 Dec 2008 09:59:26 -0000 Received: from 62-47-37-228.adsl.highway.telekom.at (EHLO [62.47.37.228]) [62.47.37.228] by mail.gmx.net (mp066) with SMTP; 11 Dec 2008 10:59:26 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX184pzJb9Tw4q2xAi9KJGqe//HoaZFEarTKvm0Q18a VCDydzmX+Ig0AD Message-ID: <4940E3E8.8050501@gmx.at> Date: Thu, 11 Dec 2008 10:56:56 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: 1488-done@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> In-Reply-To: <87fxl446mr.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.76 Fixed as 2008-12-11 Stephen Berman * dired.el (dired-pop-to-buffer): Use fit-window-to-buffer when dired-shrink-to-fit is non-nil. (Bug#1488) Thanks, martin. From rudalics@gmx.at Thu Dec 11 09:38:14 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3-bugs.debian.org_2005_01_02 (2007-08-08) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.0000 Tokens: new, 24; hammy, 77; neutral, 60; spammy, 0. spammytokens: hammytokens:0.000-+--23.0.60, 0.000-+--23060, 0.000-+--HCC:D*com, 0.000-+--HX-Spam-Relays-External:213.165.64.20, 0.000-+--H*RU:mail.gmx.net X-Spam-Status: No, score=-6.7 required=4.0 tests=AWL,BAYES_00,FOURLA, HAS_BUG_NUMBER,MURPHY_DRUGS_REL8 autolearn=ham version=3.2.3-bugs.debian.org_2005_01_02 Received: (at 1488) by emacsbugs.donarmstrong.com; 11 Dec 2008 17:38:14 +0000 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with SMTP id mBBHcAGa011057 for <1488@emacsbugs.donarmstrong.com>; Thu, 11 Dec 2008 09:38:12 -0800 Received: (qmail invoked by alias); 11 Dec 2008 17:32:11 -0000 Received: from 62-47-45-255.adsl.highway.telekom.at (EHLO [62.47.45.255]) [62.47.45.255] by mail.gmx.net (mp069) with SMTP; 11 Dec 2008 18:32:11 +0100 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+ZETRado+ZSex731ZTd+dJuTmnjV1uBFeMGO6ZEs ZDOnJCMM5JD8iZ Message-ID: <49414E15.1020801@gmx.at> Date: Thu, 11 Dec 2008 18:29:57 +0100 From: martin rudalics User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Stephen Berman CC: 1488@debbugs.gnu.org Subject: Re: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer References: <87fxl446mr.fsf@escher.local.home> <493939C0.7010507@gmx.at> <87bpvqttvr.fsf@escher.local.home> <493966D2.5050108@gmx.at> <877i6etrjp.fsf@escher.local.home> <493AD18C.6070002@gmx.at> <87zlj5xfz8.fsf@escher.local.home> In-Reply-To: <87zlj5xfz8.fsf@escher.local.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.78 > I finally had time to apply your patch and give it a whirl. Initial > tests together with my patched dired-pop-to-buffer indicate it DTRT, > i.e., both with and without a header line I can shrink the frame and > invoke dired-pop-to-buffer without signalling an error until only one > dired line is displayable: then shrinking is no longer possible and > dired-pop-to-buffer shows one file (also with signalling an error). > I'll keep using it, maybe I'll hit a corner case, but it seems ok. I checked in a revised version of this. It's pretty hard to get right, especially when shrinking non-full-width-windows. There's still a corner case I cannot handle. Anyway, please report immediately when something appears wrong. Thanks, martin. From unknown Fri Aug 15 18:12:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Fri, 09 Jan 2009 15:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator