Subject: bug#32825: 27.0.50; Deterministic window management

From: martin rudalics <[email-masked]>
Date: Thu, 01 Nov 2018 10:01:33 +0100

> I think the semantics should be:
 >
 > (4) If the height of the new window will be less than 10 lines specified
 >      by window-min-height, then display the buffer a window below
 >      from the selected window.
 >
 > IIUC, currently 'window-min-height' with the default of 4 lines works like this?

Not really: 'window-min-height' is an option which causes functions to
check the height of all windows wrt a potential change.  If, after the
change, the height of one window would drop below that value, the
change is not made.  One can make an exeption for a specific window,
for example the one that should be resized or newly made, but not for
other windows that are probably not related to the change.

But I don't fully understand (4): What does "If the height of the new
window will be less than 10 lines specified by window-min-height"
mean?  Does it stand for "if (split-window nil -10) fails" to produce
a 10 line window?  And what would we do then if the window below the
selected one has less than ten lines?

 >>     Applications should never rebind this variable.  To resize a
 >>     window to a height less than the one specified here, an
 >>     application should instead call ‘window-resize’ with a non-nil
 >>     IGNORE argument.  In order to have ‘split-window’ make a window
 >>     shorter, explicitly specify the SIZE argument of that function.
 >
 > How then the code will look like?  I guess it will be quite complex
 > and not declarative.

Why so?  What is more declarative than having code say what size the
old or new window should have?  If we want such a window to always
keep some minimum size, we can obviously add an according parameter.

martin