From: martin rudalics <rudalics@gmx.at>
To: Juri Linkov <juri@linkov.net>
Cc: Michael Heerdegen <michael_heerdegen@web.de>,
63455@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#63455: 30.0.50; display-buffer-in-direction is always resizing
Date: Sat, 20 May 2023 10:27:41 +0200 [thread overview]
Message-ID: <cb5bb17d-4442-b4ad-ccd4-74f90598890a@gmx.at> (raw)
In-Reply-To: <86o7mgb4z2.fsf@mail.linkov.net>
>> Almost (I had to make 'ediff-setup-windows-plain-compare' do what your
>> patch does). But as I mentioned earlier, you might want to replace
>> 'fit-window-to-buffer' with something conditioned on whether the user
>> has customized 'temp-buffer-resize-mode' - some users simply might not
>> want their windows to auto-resize.
>
> I still don't understand the need to add a new function.
The new function would serve, for example, in
'ediff-setup-windows-plain-compare'
(select-window (display-buffer-in-direction
control-buffer
'((direction . bottom)
(window-height . fit-window-to-buffer))))
to make sure the window is fit iff 'temp-buffer-resize-mode' is enabled.
> When users don't want their windows to auto-resize,
> then they can simply do:
>
> (add-to-list 'display-buffer-alist
> '("*Help*" nil
> ;; Inhibit resizing Help buffers
> (window-height . nil)))
A user who has not set 'temp-buffer-resize-mode' does not want
auto-resizing to happen and probably does not want to deal with
'display-buffer-alist' either.
In either case, the new function is not relevant to your example. That
setup doesn't work with 'temp-buffer-resize-mode' turned on because
'help--window-setup' ignores 'display-buffer-alist' when it does
(when (and window temp-buffer-resize-mode)
(let (resize-temp-buffer-window-inhibit)
(resize-temp-buffer-window window)))))))
All this has become very contrived because of 'help-make-xrefs'. I
suppose we have to (1) make 'temp-buffer-windo-show' return the function
'display-buffer' would have used to resize the window if NO-RESIZE had
allowed it to do so and (2) have 'help--window-setup' apply the return
value, if non-nil, to resize the window after calling 'help-make-xrefs'.
If worse comes to worst, 'help--window-setup' may have to investigate
the current value of 'resize-temp-buffer-window-inhibit' too ...
martin
next prev parent reply other threads:[~2023-05-20 8:27 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
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 [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cb5bb17d-4442-b4ad-ccd4-74f90598890a@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 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).