emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Redisplay hook error backtraces


From: Eli Zaretskii
Subject: Re: Redisplay hook error backtraces
Date: Sat, 16 Jul 2022 09:03:13 +0300

> Date: Fri, 15 Jul 2022 18:18:14 +0000
> Cc: monnier@iro.umontreal.ca, larsi@gnus.org, emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> I've come to see that `backtrace-on-redisplay-lisp-error', although
> accurate, is too much of a mouthful, and I think it needs shortening.
> Would anybody object to me just calling this variable `debug-redisplay'?

Too general, IMO.  How about backtrace-on-redisplay-errors?

> Also, I think that writing the backtrace into *Backtrace* is a bad idea,
> now.  Users expect such a buffer to have active facilities, whereas the
> new backtrace is just a dead dump.  Is there any objection to me instead
> calling the buffer something like "*Redisplay-trace*"?

No objections, but I think you are again over-engineering things.

> +Note that, for technical reasons, you cannot use the facilities
> +defined in this subsection to debug errors in hooks the redisplay code
> +has invoked.  @xref{Debugging Redisplay} for help with these.
                                           ^
A comma missing there.

> +@node Debugging Redisplay
> +@subsection Debugging Redisplay Hooks
> +@cindex redisplay hooks

This @cindex should be "redisplay hooks, debugging", because it
doesn't talk about the hooks in general.

> +When a Lisp error occurs in a hook function which redisplay has
> +invoked, you cannot use Emacs's usual debugging mechanisms, for
> +technical reasons.  This subsection describes how to get a backtrace
> +from such an error, information which should be helpful in debugging
> +it.

This talks about hooks, which restricts the scope of the facility: we
want to be able to collect backtraces from any Lisp called by the
display code.  For example, :eval forms in the mode line, Lisp code
called by fontification-functions, etc.  So the text ebove needs to be
revised with this in mind.

> +The hooks which these directions apply to are the following:

I don't want us to have a list that looks like it's an exhaustive one.
maintaining such a list is a maintenance burden we are better without.
Please give a couple of examples and change the text to the effect
that these are just examples.

> +*** It is now possible to generate a backtrace from errors in redisplay
> +hooks.  To do this, set the new variable

The heading line should be a full sentence.

Thanks.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]