unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#63455: 30.0.50; display-buffer-in-direction is always resizing
@ 2023-05-12  1:06 Michael Heerdegen
  2023-05-12  7:39 ` martin rudalics
  2023-05-12 17:11 ` Juri Linkov
  0 siblings, 2 replies; 21+ messages in thread
From: Michael Heerdegen @ 2023-05-12  1:06 UTC (permalink / raw)
  To: 63455; +Cc: rudalics, juri, dgutov


X-Debbugs-CC: rudalics@gmx.at, juri@linkov.net, dgutov@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.





^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-05-24  2:48 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-12  1:06 bug#63455: 30.0.50; display-buffer-in-direction is always resizing Michael Heerdegen
2023-05-12  7:39 ` martin rudalics
2023-05-12 17:16   ` Juri Linkov
2023-05-13  8:56     ` martin rudalics
2023-05-15 17:01       ` Juri Linkov
2023-05-15 18:21         ` Eli Zaretskii
2023-05-16  7:19         ` martin rudalics
2023-05-16 16:35           ` Juri Linkov
2023-05-17 16:56   ` Juri Linkov
2023-05-18  8:29     ` martin rudalics
2023-05-18 15:54       ` Juri Linkov
2023-05-19  7:31         ` martin rudalics
2023-05-19 17:54       ` Juri Linkov
2023-05-20  8:27         ` martin rudalics
2023-05-22 18:03           ` Juri Linkov
2023-05-23  2:30             ` Michael Heerdegen
2023-05-23 18:25               ` Juri Linkov
2023-05-24  2:48                 ` Michael Heerdegen
2023-05-12 17:11 ` Juri Linkov
2023-05-13  5:29   ` Michael Heerdegen
2023-05-15 17:02     ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).