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


View this message in rfc822 format

From: martin rudalics <rudalics <at> gmx.at>
To: Lars Ingebrigtsen <larsi <at> gnus.org>, Juri Linkov <juri <at> linkov.net>
Cc: 55169 <at> debbugs.gnu.org
Subject: bug#55169: Can't combine window-min-height with window-height
Date: Sat, 30 Apr 2022 10:03:33 +0200
> I'd expect that to work as you describe (or perhaps with the alist in
> opposite order), and it doesn't.  Perhaps Martin has some comments;
> added to the CCs.

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.

martin




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.