Subject: bug#75632: 31.0.50; igc: Crash report

From: Eli Zaretskii <[email-masked]>
Date: Sun, 19 Jan 2025 15:45:55 +0200

> Date: Sun, 19 Jan 2025 13:37:18 +0000
> From: Pip Cet <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> "Eli Zaretskii" <[email-masked]> writes:
> 
> > and at temacs time?
> 
> I don't think it's a realistic scenario that someone needs to debug
> non-interactive temacs, cannot use the default signal, and wants to
> change it.

I meant the interactive temacs, which begins by loading all the
preloaded packages.  So one of those could add the watcher.

> > Also, perhaps make the function debug-on-event call the watcher, not
> > itself be the watcher.  I think that might make the API cleaner.  The
> 
> You've lost me there.  I was thinking debug-on-event, a Lisp function,
> calls debug--on-event, a C subr, and we also install, from Lisp, a
> variable watcher on the deprecated debug-on-event variable.

That's what I meant, yes.

> Before you read the patch: bindings.el doesn't seem like the best place
> for this code; it's related to signal handlers, and I added a comment
> while I was there, but I couldn't find one right away.  Any suggestions?

One of the first files we load in loadup, I think?  Like subr.el,
perhaps?

> Potentially separate bug:
> 
> In emacs -Q, the variable documentation contains the bytecode
> representation of the lambda watcher:
> 
>   Calls these functions when changed: (#[1028 \300%3!\207 [debug--on-event] 6 
> 
> (fn SYMBOL NEWVAL OPERATION WHERE)])
> 
> I don't think ordinary Emacs users can read byte-code objects.  I
> certainly cannot.

It's not optimal, indeed.  See a somewhat better arrangement we have
with the variables which should trigger redisplay of the current
buffer, at the end of frame.el.

> Should we fix that in the documentation code, work around it by naming
> the watcher, or both?

See above: changing the way we call the watcher is probably easier,
and yields satisfactory results.

Thanks.