GNU bug report logs - #65267
30.0.50; modifying debug-ignored-errors during startup with --debug-init is broken

Previous Next

Package: emacs;

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>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 65267 <at> debbugs.gnu.org, monnier <at> iro.umontreal.ca
Subject: bug#65267: 30.0.50; modifying debug-ignored-errors during startup with --debug-init is broken
Date: Sun, 13 Aug 2023 12:03:41 +0200
On Sun, 13 Aug 2023 12:49:42 +0300
Eli Zaretskii wrote:

>> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>
>> From: Štěpán Němec
>>  <stepnem <at> smrk.net>
>> Date: Sun, 13 Aug 2023 09:54:29 +0200
>> 
>> 
>> sh(1) reproduction recipe:
>> 
>> --8<--
>> initdir=$(mktemp -d)
>> 
>> echo "(add-to-list 'debug-ignored-errors 'my-error)" >"$initdir"/init.el
>> emacs --debug-init --init-dir="$initdir" \
>>       --eval '(message "%S" debug-ignored-errors)'
>> 
>> rm -rf "$initdir"
>> --8<--
>> 
>> In the emacs thus started, the value of `debug-ignored-errors' is
>> "(my-error startup--witness)" instead of `my-error' added to
>> the default ignored error symbol list.
>
> I believe this is a feature:

Here's hoping it isn't.

> when the user says --debug-init, they need to be shown all the errors
> raised during startup; hiding some of the errors was a misfeature in
> previous versions of Emacs, now fixed.

That would seem OK to me.  The problem is that, as it is now, this
breaks normal Emacs usage of anyone who starts with --debug-init and
happens to modify `debug-ignored-errors' as part of their
initialization.

Note that it might not even be user-intentional/explicit modification,
e.g., I noticed the problem because I load yasnippet from my init file,
and yasnippet adds a custom regexp to debug-ignored-errors; so now I end
up with bogus debug-ignored-errors value, which is further aggravated by
the fact that I normally run with debug-on-errors set, so, for example,
I now end up in the debugger whenever I press C-n at the end of buffer
(until I manually restore debug-ignored-errors to a sane value).

-- 
Štěpán




This bug report was last modified 1 year and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.