GNU bug report logs -
#65267
30.0.50; modifying debug-ignored-errors during startup with --debug-init is broken
Previous Next
Reported by: Štěpán Němec <stepnem <at> smrk.net>
Date: Sun, 13 Aug 2023 09:35:02 UTC
Severity: normal
Found in version 30.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Štěpán Němec <stepnem <at> smrk.net>
> Date: Sun, 13 Aug 2023 19:08:26 +0200
>
> On Sun, 13 Aug 2023 12:19:31 -0400
> Stefan Monnier via wrote:
>
> > Yeah, it's wrong, but I'm not sure how to fix it:
> > `--debug-init` needs to change the value of `debug-ignored-errors` while
> > `init.el` is executed,
>
> FWIW, I'm sure I'm missing something, but the above is far from obvious
> to me. Why does --debug-init need to muck with debug-ignored-errors at
> all? debug-ignored-errors usually/mostly contains errors unlikely to
> occur during startup, and even if they do occur during startup, why
> should Emacs not respect debug-ignored-errors and ignore them?
If debug-ignored-errors were by default nil, then this would have made
sense. But that's not the case: we set debug-ignored-errors to a
non-nil value by default, and that gets in the way of --debug-init.
See bug#64163. How's that for user surprise?
> (I also couldn't find this exception (i.e., --debug-init causing
> debug-ignored-errors to be ignored) documented anywhere, BTW.)
The value set by the init file was not supposed to be ignored, only
our own self-imposed default was. So there was nothing to document:
those are Emacs internals, and we tweak them to make --debug-init work
as expected, which is to catch every error.
> > We could document that modifying debug-ignored-errors only works
> > reliably if done from after-init-hook. WDYT?
>
> Pushing the breakage downstream... would mean packages like yasnippet
> would have to adapt, among other things.
Why on earth does yasnippet modify the value of a user variable?
> Not the end of the world, I guess, but I still don't understand why
> the breakage (or "change in behavior", if you prefer) is necessary
> or desired.
See above: it was the result of fixing a bug.
Another possibility, I guess, would be to set debug-ignored-errors to
its current default only after loading the user init file, and do that
in a way that _adds_ the ignored-by-default errors to the list it has
after loading init files. Before loading the init files, the value
could would be nil.
This bug report was last modified 1 year and 308 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.