Subject: bug#63455: 30.0.50; display-buffer-in-direction is always resizing

From: Juri Linkov <[email-masked]>
Date: Mon, 22 May 2023 21:03:58 +0300

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

Maybe a good name for the new function would be 'fit-window-to-temp-buffer'?