bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#65267: 30.0.50; modifying debug-ignored-errors during startup with -


From: Eli Zaretskii
Subject: bug#65267: 30.0.50; modifying debug-ignored-errors during startup with --debug-init is broken
Date: Sun, 13 Aug 2023 22:05:13 +0300

> From: Štěpán Němec <stepnem@smrk.net>
> Cc: monnier@iro.umontreal.ca, 65267@debbugs.gnu.org
> Date: Sun, 13 Aug 2023 20:35:25 +0200
> 
> > See bug#64163.  How's that for user surprise?
> 
> Well, I did read that report, but, rather than making me believe
> --debug-init should ignore debug-ignored-errors, it made me wonder if
> having `end-of-file' on debug-ignored-errors was a good idea to begin
> with.  It doesn't seem to fit the general user-error-like pattern of
> the other members.

Imagine that your init file has one of these errors and you want to
debug them with --debug-init.  Why wouldn't that be possible?

IOW, the --debug-init option is meant to allow the users to find out
_where_ in their init files the error which fails them happens, so it
makes very little sense to mask some of those errors when the
debugging mode is requested by the user.

> > Why on earth does yasnippet modify the value of a user variable?
> 
> I can't speak for yasnippet maintainers, but let's have a look at what
> GNU Emacs says, in the comment above debug-ignored-errors in
> bindings.el, line 879:
> 
> ;; Packages should add to this list appropriately when they are
> ;; loaded, rather than listing everything here.
> 
> Sounds somewhat suggestive.

It is easy to remove that comment.  User options shouldn't be touched
by packages.

> Granted, one might interpret "packages"
> above as internal-only, OTOH you call debug-ignored-errors a "user
> variable" (and indeed it is accessible from the Custom machinery).
> Maybe storing part of "Emacs internals" in a user variable isn't
> optimal, either?

By "Emacs internals" part I alluded to the fact that we temporarily
tweak the value for the benefit of making --debug-init as useful as
users expect.  It's similar to the fact that some user options are
evaluated more than once during startup, for some good reasons.

> In any case, even if we leave packages out of the
> equation, the recent change breaks anybody who peruses the user variable
> during init, so blessing the new behavior would cause some pain for some
> users (in addition to package maintainers).

There's no argument that the value of debug-ignored-errors should be
left after startup as users expect -- that it isn't so now is a bug
that needs to be fixed one way or another.  But the fact that using
the --debug-init option temporarily resets debug-ignored-errors to nil
while Emacs loads the init files is _not_ a bug, it's a feature
intended to meet user expectations from this option.





reply via email to

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