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

From: martin rudalics <[email-masked]>
Date: Tue, 02 Oct 2018 09:38:57 +0200

>> (push '("*Backtrace*" (display-buffer-reuse-window
 >> display-buffer-pop-up-frame) (reusable-frames . t))
 >>        display-buffer-alist)
 >
 > What I meant was "always use a special, but always one and the same
 > frame".

Users have all possible freedom in this regard.  Your "always use a
special, but always one and the same frame" would have to be specified
more precisely but there is no reason it cannot be done.  For example,
users who want to use a dedicated frame for that purpose can write
their own 'my-display-backtrace' function which creates that frame if
necessary, remembers it in a variable of their choice, and reuses it -
from that variable - in a later invocation.

 > The 'reusable-frame' association in your 'display-buffer-alist'
 > entry doesn't accomplish that, because when pop-to-buffer is called, the
 > *Backtrace* buffer is typically not shown anymore at that moment in that
 > frame.

Users who want to leave the initial choice of the window to 'debug'
and only chime in later can use 'debugger-previous-window' and
'debugger-pre-previous-window' in their customizations.

I'm afraid that yours is yet another example of how difficult it is to
customize 'display-buffer-alist'.  Back then, I warned Stefan and
Chong that this would happen.  But they argumented with the greater
flexibility of the action functions/action alist approach.  So once
more: 'display-buffer-alist' allows you to do virtually everything and
thus override and reuse anything 'debug' does.  But it might not be
intuitive to do that and sometimes requires to read the code of the
invoker of 'display-buffer' ('debug' in this case) in order to play
along with that.

martin