all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Michael Heerdegen <michael_heerdegen@web.de>, 63455@debbugs.gnu.org
Cc: dgutov@yandex.ru, juri@linkov.net
Subject: bug#63455: 30.0.50; display-buffer-in-direction is always resizing
Date: Fri, 12 May 2023 09:39:40 +0200	[thread overview]
Message-ID: <77edb1db-13ad-fa1d-d1fc-7a23f0b6240d@gmx.at> (raw)
In-Reply-To: <87fs82z7cw.fsf@web.de>

 > 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.

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.  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.

martin





  reply	other threads:[~2023-05-12  7:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=77edb1db-13ad-fa1d-d1fc-7a23f0b6240d@gmx.at \
    --to=rudalics@gmx.at \
    --cc=63455@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=juri@linkov.net \
    --cc=michael_heerdegen@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.