Subject: Re: bug#51062: Customizable window resizing

From: Juri Linkov <[email-masked]>
Date: Thu, 14 Oct 2021 20:14:58 +0300

>>> The problem is rather that 'display-buffer' wasn't used in the first
>>> place to show the buffer.  Two things we could try to cover buffers that
>>> are shown via 'set-window-buffer' are
>>>
>>> - Invent a new buffer-local variable, say 'inhibit-temp-buffer-resize'
>>>    with the obvious meaning.
>>>
>>> - Invent a new window parameter 'inhibit-temp-buffer-resize' with the
>>>    obvious meaning.
>>
>> Earlier I proposed to add a new hook whose default value contains
>> shrink-window-if-larger-than-buffer, so it can easily be removed from the hook.
>
> What was that hook called?  I think we first have to decide whether we
> want to inhibit such shrinks and fits for any display operation or only
> those administrated by 'display-buffer'.  Then we'd either install that
> inhibiting thing via 'window--display-buffer' (where we work on alist so
> we can decide who overrides whom) or directly in 'fit-window-to-buffer'
> (where we cannot discriminate any more whether an application very
> urgently wants to impose its behavior and we always rely on the user's
> setting).

This hook was called 'after-display-buffer-function' in
https://debbugs.gnu.org/45688#137