Subject: bug#65267: 30.0.50; modifying debug-ignored-errors during startup with --debug-init is broken

From: Eli Zaretskii <[email-masked]>
Date: Sun, 13 Aug 2023 15:38:17 +0300

> From: Štěpán Němec <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Sun, 13 Aug 2023 12:24:45 +0200
> 
> I fail to see how any of that pertains to the issue at hand.  Just to be
> a bit more certain we understand each other: no errors occur during
> startup; I'm not talking about any kind of debugging scenario, or
> suppressing errors during startup.  The bug I describe causes a
> perfectly cleanly started Emacs to end up with bogus
> debug-ignored-errors, possibly (even likely) without the user
> intentionally modifying any defaults, other than passing --debug-init to
> Emacs and loading (as part of initialization) a package that might add
> to debug-ignored-errors, both of which seem perfectly fine things to do
> to me (and had been working for years until the recent changes).

If debug-ignored-errors isn't returned to its original value after
Emacs starts, that's a bug that wasn't supposed to happen.

However, if I start Emacs as

  $ emacs --debug-init

and then evaluate debug-ignored-errors after it starts, I see the
original value.  So this part seems to work.  It is only if I add some
symbol to debug-ignored-errors in the init file that the problem
happens.  So I guess the convoluted logic in
startup--load-user-init-file is missing something, Stefan?