Subject: bug#55169: Can't combine window-min-height with window-height

From: martin rudalics <[email-masked]>
Date: Sat, 14 May 2022 09:49:02 +0200

>> That's what I'm trying to bring up ever since we started this thread.
 >> AFAICT we'd need two new functions at least - an action function say
 >> 'display-buffer-split-window'
 >
 > Can the existing 'display-buffer-in-direction' be used to split window?

Yes.  I've rewritten it long ago but it now contains references to
functions based on scaling the body sizes of windows and implementing
these has stalled.  Eventually, 'display-buffer-in-direction' should
replace 'display-buffer-pop-up-window' and its heuristics ...

 > Or a new action 'display-buffer-split-in-direction' is needed?

No.  The "-direction" suffix should tell enough about where the window
should go (incidentally, nowadays many people use side windows for that
purpose).

 >> and a 'dislay-buffer-fit-window' function
 >> - both accepting the ALIST as (additional) argument.
 >
 > But they can't be used simultaneously?  When 'display-buffer-split-window'
 > splits the window, then the next 'dislay-buffer-fit-window' is not called?

Sorry, I meant 'dislay-buffer--fit-window'.  Not an action function but
one that would fit or shrink the window and accept the ALIST as extra
argument.  So it could process all sorts of minimum or maximum heights
the user or application wants.

 > Maybe a new alist key could be added, e.g. 'window-fit',
 > that is like 'window-height' but also adds the new arg 'alist'?

Something like that, yes.  It would end up calling the
'dislay-buffer--fit-window' function mentioned above.

martin