Subject: Re: bug#51062: Customizable window resizing

From: martin rudalics <[email-masked]>
Date: Thu, 14 Oct 2021 11:13:13 +0200

> Strange, when I tested the patch that you sent to emacs-devel,
 > it worked correctly.  But after you applied the patch on master,
 > it doesn't work.  I'm trying to debug why (window-height . nil)
 > has no effect on Help buffers.

Indeed.  I probably tried to optimize it before pushing.  Should be
fixed now.

 >> Which command is 'vc-log'?
 >
 > I meant log-related vc-commands that use
 > shrink-window-if-larger-than-buffer, i.e.
 > all commands that use vc-log-internal-common.

I see.

 >> But if 'display-buffer' is not involved, there isn't much we
 >> can do.  Maybe something like 'display-buffer-same-window' _after_
 >> putting the buffer into the selected window, but this might not be 100%
 >> compatible.  Certainly not for Emacs 28.
 >
 > This is a good idea to try.  But not sure how this is possible to use in
 > vc-run-delayed that is called when the buffer was already displayed long ago.

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.

martin