Subject: Re: bug#32825: 27.0.50; Deterministic window management

From: martin rudalics <[email-masked]>
Date: Wed, 31 Oct 2018 09:10:58 +0100

> I still don't understand why it's impossible to support such uses?
 >
 > diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el
 > index 7fc2b41c70..6d72616dbc 100644
 > --- a/lisp/emacs-lisp/debug.el
 > +++ b/lisp/emacs-lisp/debug.el
 > @@ -239,11 +239,13 @@ debug
 >   	      (pop-to-buffer
 >   	       debugger-buffer
 >   	       `((display-buffer-reuse-window
 > -		  display-buffer-in-previous-window)
 > -		 . (,(when (and (window-live-p debugger-previous-window)
 > -				(frame-visible-p
 > -				 (window-frame debugger-previous-window)))
 > -		       `(previous-window . ,debugger-previous-window)))))
 > +		  display-buffer-in-previous-window
 > +		  display-buffer-below-selected)
 > +		 . ((window-min-height . 10)

What would the semantics of that 'window-min-height' entry be?

(1) When splitting a window, the new window must be at least 10 lines
     high.

(2) When splitting a window, both the old and the new window must be
     at least 10 lines high after the split.

(3) When splitting a window, every window must be at least 10 lines
     high after the split.

And what would we do if before the split a window is less high than 10
lines?

Why can't we just follow the doc-string of 'window-min-height'?

    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.

 > +		    ,@(when (and (window-live-p debugger-previous-window)
 > +				 (frame-visible-p
 > +				  (window-frame debugger-previous-window)))
 > +		        `((previous-window . ,debugger-previous-window))))))
 >   	      (setq debugger-window (selected-window))
 >   	      (if (eq debugger-previous-window debugger-window)
 >   		  (when debugger-jumping-flag

martin