Subject: Can't combine window-min-height with window-height

From: Juri Linkov <[email-masked]>
Date: Thu, 28 Apr 2022 20:58:18 +0300

As bug#33007 revealed, window-min-height doesn't prevent
from too narrow window height when using such call:

  (pop-to-buffer (generate-new-buffer "*edit string*")
                 '(display-buffer-below-selected
                   (window-min-height . 10)
                   (window-height . fit-window-to-buffer)))

Shouldn't the order of processing these parameters be rather like this:

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.

Then the caller could insert the initial string, and
'fit-window-to-buffer' will fit the window.  If the window height
is less than 10 lines, it will enlarge to 10 lines.  But in case of
too many lines, the window height should not be more than
half of the original window.