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


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: 63455 <at> debbugs.gnu.org
Cc: rudalics <at> gmx.at, juri <at> linkov.net, dgutov <at> yandex.ru
Subject: bug#63455: 30.0.50; display-buffer-in-direction is always resizing
Date: Fri, 12 May 2023 03:06:07 +0200
X-Debbugs-CC: rudalics <at> gmx.at, juri <at> linkov.net, dgutov <at> yandex.ru

Hello,

(info "(elisp) Buffer Display Action Alists") says near the end:

|    If no ‘window-height’, ‘window-width’ or ‘window-size’ entry was
| specified, the window may still be resized automatically when the buffer
| is temporary and ‘temp-buffer-resize-mode’ has been enabled, *note
| Temporary Displays::.  In that case, the CDR of a ‘window-height’,
| ‘window-width’ or ‘window-size’ entry can be used to inhibit or override
| the default behavior of ‘temp-buffer-resize-mode’ for specific buffers
| or invocations of ‘display-buffer’.

OTOH, the action `display-buffer-in-direction' _always_ resizes the
window no matter what buffer is current.  Try e.g.

#+begin_src emacs-lisp
(display-buffer (current-buffer)
               '((display-buffer-in-direction) . ((direction . top))))
#+end_src

from any window or buffer.

This is handled by this part of the implementation of
`display-buffer-in-direction':

#+begin_src emacs-lisp
	(setq alist
	      (append alist
		      `(,(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))))))
#+end_src

Looking at that it doesn't seem to be intended as a general behavior,
and the behavior is not a good default IMO - even if it can be
suppressed by adding a (window-height . nil) entry to the
`display-buffer' call.

I guess that Bug#45945 could be a symptom of this problem.


TIA,

Michael.




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.