Subject: Re: bug#51062: Customizable window resizing

From: martin rudalics <[email-masked]>
Date: Thu, 14 Oct 2021 19:47:26 +0200

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

But what would that accomplish when an application does

(setq window (display-buffer foo))
[...]
(shrink-window-if-larger-than-buffer window)

The 'shrink-window-if-larger-than-buffer' can be inhibited only if the
hook sets something for FOO or WINDOW that inhibits shrinking it.  And
that can be easily accomplished by a 'window-height' alist entry.

OTOH with

(setq window (split-window))
[...]
(shrink-window-if-larger-than-buffer window)

your hook (and the alist entry) cannot inhibit anything.

martin