Subject: bug#13336: [External] : Re: bug#13336: `next-frame' should not choose the *Backtrace* frame while debugging

From: Drew Adams <[email-masked]>
Date: Wed, 25 Aug 2021 15:27:05 +0000

>  > I could add a `*Backtrace*' entry to my value of
>  > `special-display-buffer-names', yes, and duplicate the
>  > parameters of `special-display-regexps' but also add
>  > the kludge to work around this bug.
> 
> What would you have to "duplicate" here?

"the parameters of `special-display-regexps'".

I want the *Backtrace* frame to look and act like
frames for other buffers whose names also match
that regexp.

>  > Is that necessary?  I was guessing it would be OK
>  > (and reasonable) to use `after-make-frame-functions'.
> 
> Using `after-make-frame-functions' requires a
> certain knowledge of Elisp.

Meaning what - what "certain knowledge"?  I guess
you're suggesting that I lack it, so it would be
good to know what it is.

>  >> why on earth don't you use the FRAME-PARAMETERS idiom?
>  >
>  > It's not clear to me what idiom you have in mind.
> 
>  From the doc-string of `special-display-regexps':
> 
>    Alternatively, an element of this list can be
>    specified as (REGEXP FRAME-PARAMETERS),

I define the frame parameters separately, with a
user option, `1on1-special-display-frame-alist'
(which others besides myself use).  The setting of
just `special-display-regexps' is in my init file,
for myself alone.

Put differently, I separate the appearance of
special-display frames from a criterion (in this
case buffer-name-matching-regexp) for which buffers
get special-display frames.

That's also the purpose, presumably, of option
`special-display-frame-alist' (which option
`1on1-special-display-frame-alist' augments).

>  >>   > Debugging a bit shows that frame parameter `name' for
>  >>   > the *Backtrace* frame is indeed "*Backtrace*",
>  >>
>  >> Not at the time `after-make-frame-functions' gets called
>  >> (unless you specified a name for it).
>  >
>  > I see.  How would I do that?  I don't control how or
>  > when the frame gets created.
> 
> Which means that you have to deal with a situation handled by
> `special-display-regexps' once and `display-buffer-alist' now.

Sorry, I don't know what you're referring to.
Could you be specific?

>  >> If you insist on using `after-make-frame-functions',
>  >> the following should work.
>  >
>  > I don't insist.  I was trying to interpret what you
>  > suggested.  Should I not use `after-make-frame-functions'
>  > for some reason (why)?
> 
> Because using `after-make-frame-functions' requires
> a certain knowledge of Elisp.

See above.

Is there some specific caveat about using this hook,
which is not in the Elisp manual?  Nothing particular
is said in the manual about the hook.

What special Elisp knowledge is required?  Why the
vague formulation (repeated) of "a certain knowledge"?
It's not clear to me what you're suggesting.