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

From: Juri Linkov <[email-masked]>
Date: Fri, 07 Dec 2018 01:31:37 +0200

>> What values of window-min-height and window-height would you recommend
>> for the *Backtrace* buffer's window?  Should we set only window-min-height
>> to e.g. 10 lines tall, or also window-height?  I'd like to see how this
>> design applies in practice.
>
> 'window-min-height' would have the value you had in mind originally.
> 'window-height' could be the same but this might be too rigid.  IIUC
> 'debug' first displays the buffer and only afterwards inserts its
> text.  If you can change that, try to use 'fit-window-to-buffer' as
> 'window-height' value.  Otherwise, 'debug' can always call
> 'fit-window-to-buffer' separately after it has inserted its text.
>
> But please keep in mind that 'display-buffer' can always split a small
> (say ten lines) window that is alone on its frame or when the user has
> made a special alist entry for it.  Hence 'debug' cannot rely on the
> fact that the window produced by 'display-buffer' indeed has or can
> have 'window-min-height' lines.  That guarantee is only provided by
> 'display-buffer-below-selected' (with my current proposal).

I tried to add actions 'display-buffer-below-selected' and
'display-buffer-at-bottom' with alist (window-min-height . 10)
to your debugger-previous-window patch, and it works well.