Subject: bug#32825: 27.0.50; Deterministic window management

From: Juri Linkov <[email-masked]>
Date: Sat, 10 Nov 2018 23:53:10 +0200

>> There are only two places where debugger-previous-window is set - both
>> in `debug': in the first, the value is set when the debugger pops up, to
>> the window that has been chosen to display it.  In the second place,
>> it's reset to nil when the debugger "won't be back".
>>
>> So, when the value is a (live) window, it should be respected.  I didn't
>> follow your discussion very attentively, but I'm not sure how the
>> debugger-previous-window variable is concerned in what you discussed
>> recently.  AFAIK its only use is to remember the window while a debugger
>> session is still active.
>
> You're right - FWIW this is the same bug I proposed to fix earlier
> with the patch I reattach now.  Juri, you never tried it, I suppose?

I tried it long ago to see it works fine, and later reverted locally
because I thought already you pushed it to master.

Now I tried again with display-buffer-below-selected, and it still
works fine.

But still it seems better would be to add display-buffer-at-bottom
after display-buffer-below-selected:

display-buffer-reuse-window
display-buffer-in-previous-window
display-buffer-below-selected
display-buffer-at-bottom

because display-buffer-at-bottom tries to resize other windows
to accommodate the *Backtrace* window.