GNU bug report logs - #1488
23.0.60; dired-pop-to-buffer: use fit-window-to-buffer

Previous Next

Package: emacs;

Reported by: Stephen Berman <Stephen.Berman <at> rub.de>

Date: Thu, 4 Dec 2008 09:50:02 UTC

Severity: normal

Done: martin rudalics <rudalics <at> gmx.at>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Stephen Berman <Stephen.Berman <at> rub.de>
Cc: 1488 <at> debbugs.gnu.org
Subject: bug#1488: 23.0.60; dired-pop-to-buffer: use fit-window-to-buffer
Date: Fri, 05 Dec 2008 15:25:04 +0100
[Message part 1 (text/plain, inline)]
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.
[window.el.diff (text/plain, inline)]
*** 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

This bug report was last modified 16 years and 166 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.