GNU bug report logs - #63455
30.0.50; display-buffer-in-direction is always resizing

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Fri, 12 May 2023 01:07:01 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #14 received at 63455 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Michael Heerdegen <michael_heerdegen <at> web.de>, 63455 <at> debbugs.gnu.org,
 dgutov <at> yandex.ru
Subject: Re: bug#63455: 30.0.50; display-buffer-in-direction is always resizing
Date: Fri, 12 May 2023 20:16:20 +0300
> I think you're right.  In my local Emacs I removed both incarnations of
> that code (the other one being in 'display-buffer--maybe-at-bottom')
> long ago.

There are 3 uses of 'display-buffer--maybe-at-bottom' in the Emacs
source tree: 'project-kill-buffers' and 'save-buffers-kill-emacs'
override the default.  But 'hack-local-variables-confirm'
depends on the current default value.

> I can only shortly sketch how I manage things here: The end
> of 'help--window-setup' has become
>
>         (help-window-setup
>          (setq window (temp-buffer-window-show (current-buffer) nil t)))
>         (help-make-xrefs (current-buffer))
> 	(when (and window temp-buffer-resize-mode)
>           (let (resize-temp-buffer-window-inhibit)
>             (resize-temp-buffer-window window)))))))
>
> 'temp-buffer-window-show' has a third argument NO-RESIZE and its last
> lines are rewritten as
>
> 	(with-selected-window window
> 	  (run-hooks 'temp-buffer-window-show-hook)
> 	  (when (and (not no-resize) temp-buffer-resize-mode)
> 	    (resize-temp-buffer-window window)))
> 	;; Return the window.
> 	window))))
>
> Maybe Juri can make heads or tails of this.

Are these changes intended to completely remove these lines from
'display-buffer-in-direction' and 'display-buffer--maybe-at-bottom'?

		      `(,(if temp-buffer-resize-mode
		             '(window-height . resize-temp-buffer-window)
	                   '(window-height . fit-window-to-buffer))
	                ,(when temp-buffer-resize-mode
	                   '(preserve-size . (nil . t))))

I expected that only 1 line should be removed to change this to:

		      `(,(when temp-buffer-resize-mode
		           '(window-height . resize-temp-buffer-window))
	                ,(when temp-buffer-resize-mode
	                   '(preserve-size . (nil . t))))

But if all lines should be removed, then how to use it?
I tried with your patch, but this doesn't resize the window:

(setq temp-buffer-resize-mode t)
(display-buffer (current-buffer)
		'((display-buffer-in-direction) . ((direction . top))))




This bug report was last modified 2 years and 22 days ago.

Previous Next


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