GNU bug report logs -
#70063
[PATCH] fix warning-suppress for list type "warning type"
Previous Next
Reported by: Xuan Wang <code <at> wangxuan.name>
Date: Fri, 29 Mar 2024 04:08:03 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 70063 in the body.
You can then email your comments to 70063 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#70063
; Package
emacs
.
(Fri, 29 Mar 2024 04:08:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Xuan Wang <code <at> wangxuan.name>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 29 Mar 2024 04:08:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
Bug report:
In warnings.el, the function warning-suppress is supposed to save the
user's choice into variable warning-suppress-types or
warning-suppress-log-types.
The type of a warning can be a simple symbol, or a list of symbols in
the format of '(warning-type subtype subsubtype).
The change introduced by commit d5ee49c25c8f59ab17c40eebdf38a769c2f5588b
fixes the problem in situations where the warning type is a simple
symbol, but this commit's code saves wrong data if the warning type is a
list.
old behavior:
type warning-suppress-types
pkg -> '((pkg)) Correct
(pkg subtype) -> '(((pkg subtype))) Incorrect
Refer to the implementation of warning-suppress-p, an element in
warning-suppress-types must be a list of symbols, must not be a simple
symbol, and must not be a list of lists (if this is the case, nothing is
going to be matched).
How to reproduce the bug:
Use any script that can emit a warning type that is a list. Press the
button on the warning buffer to suppress the warning. Run the script and
emit the warning again; you will see the warning buffer pop up, so the
warning is not suppressed.
How this patch fix the bug:
Check if the "warning type" is a list using "consp" first. If the
warning type is a list, add it directly to warning-suppress-types.
Otherwise, use the old behavior, wrap it in a list, then add it to
warning-suppress-types.
new behavior:
type warning-suppress-types
pkg -> '((pkg)) Correct
(pkg subtype) -> '((pkg subtype)) Correct
[0001-fix-warning-suppress-for-list-type-warning-type.patch (text/patch, attachment)]
Reply sent
to
Eli Zaretskii <eliz <at> gnu.org>
:
You have taken responsibility.
(Sun, 31 Mar 2024 09:12:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Xuan Wang <code <at> wangxuan.name>
:
bug acknowledged by developer.
(Sun, 31 Mar 2024 09:12:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 70063-done <at> debbugs.gnu.org (full text, mbox):
> From: Xuan Wang <code <at> wangxuan.name>
> Date: Thu, 28 Mar 2024 21:07:34 -0400
>
> Bug report:
>
> In warnings.el, the function warning-suppress is supposed to save the
> user's choice into variable warning-suppress-types or
> warning-suppress-log-types.
>
> The type of a warning can be a simple symbol, or a list of symbols in
> the format of '(warning-type subtype subsubtype).
>
> The change introduced by commit d5ee49c25c8f59ab17c40eebdf38a769c2f5588b
> fixes the problem in situations where the warning type is a simple
> symbol, but this commit's code saves wrong data if the warning type is a
> list.
Thanks, installed on the emacs-29 branch, and closing the bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 28 Apr 2024 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.