GNU bug report logs - #55169
Can't combine window-min-height with window-height

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 28 Apr 2022 18:04:01 UTC

Severity: normal

Full log


Message #14 received at 55169 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: martin rudalics <rudalics <at> gmx.at>
Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, 55169 <at> debbugs.gnu.org
Subject: Re: bug#55169: Can't combine window-min-height with window-height
Date: Sun, 01 May 2022 20:06:04 +0300
> Ideally, a 'window-min-height' entry should be applied when an existing
> window is used via 'display-buffer-use-some-window'.  Just that in such
> case we (i) don't even look at that entry and (ii) we would not apply a
> 'window-height' entry in the first place because that one is only used
> for new windows or windows that always showed one and the same buffer.
>
> Now
>
>>> 1. first set window-height with fit-window-to-buffer;
>>> 2. then check if the constraint of window-min-height is fulfilled,
>>>     and shrink too high window.
>
> is in general non-trivial because "1." constitutes a fait accompli: We
> need a _real_ window to calculate its desired size and whether it is
> 'window-resizable' to that size.  So we may have to split some window
> first to make "1." work.  But what would we do then if "2." were not
> satisfied?  Restore the frame to a window configuration saved before
> splitting?
>
> Which means that the strategy proposed above would work seamlessly with
> 'display-buffer-reuse-window' only.  But then would we really reject a
> window showing a buffer already only because it's not large enough?
>
> As usual we are caught in between long established conveniences and more
> rigorous guide lines for how 'display-buffer' should behave.

Maybe as a workaround two calls of display-buffer would do the trick?
The first call display-buffer-below-selected will split the window,
then the second call display-buffer-use-some-window will adjust the height.




This bug report was last modified 3 years and 28 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.