GNU bug report logs -
#59458
[PATCH] Fix tracing for advanced scoring
Previous Next
Reported by: Łukasz Stelmach <stlman <at> poczta.fm>
Date: Mon, 21 Nov 2022 21:32:01 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Stefan Kangas <stefankangas <at> gmail.com>
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 59458 in the body.
You can then email your comments to 59458 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#59458
; Package
emacs
.
(Mon, 21 Nov 2022 21:32:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Łukasz Stelmach <stlman <at> poczta.fm>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 21 Nov 2022 21:32:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing
code outside of if so it's executed for both branches.
---
lisp/gnus/gnus-logic.el | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
index c1b559ba6f4..346d8a28910 100644
--- a/lisp/gnus/gnus-logic.el
+++ b/lisp/gnus/gnus-logic.el
@@ -71,11 +71,11 @@
(+ (cdr score) new-score))
(push (cons (mail-header-number gnus-advanced-headers)
new-score)
- gnus-newsgroup-scored)
- (when trace
- (push (cons "A file" rule)
- ;; Must be synced with `gnus-score-edit-file-at-point'.
- gnus-score-trace)))))))
+ gnus-newsgroup-scored))
+ (when trace
+ (push (cons "A file" rule)
+ ;; Must be synced with `gnus-score-edit-file-at-point'.
+ gnus-score-trace))))))
(defun gnus-advanced-score-rule (rule)
"Apply RULE to `gnus-advanced-headers'."
--
2.30.2
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59458
; Package
emacs
.
(Thu, 24 Nov 2022 09:25:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 59458 <at> debbugs.gnu.org (full text, mbox):
> Cc: Łukasz Stelmach <stlman <at> poczta.fm>
> From: Łukasz Stelmach <stlman <at> poczta.fm>
> Date: Mon, 21 Nov 2022 22:30:55 +0100
>
> * lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing
> code outside of if so it's executed for both branches.
> ---
> lisp/gnus/gnus-logic.el | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/lisp/gnus/gnus-logic.el b/lisp/gnus/gnus-logic.el
> index c1b559ba6f4..346d8a28910 100644
> --- a/lisp/gnus/gnus-logic.el
> +++ b/lisp/gnus/gnus-logic.el
> @@ -71,11 +71,11 @@
> (+ (cdr score) new-score))
> (push (cons (mail-header-number gnus-advanced-headers)
> new-score)
> - gnus-newsgroup-scored)
> - (when trace
> - (push (cons "A file" rule)
> - ;; Must be synced with `gnus-score-edit-file-at-point'.
> - gnus-score-trace)))))))
> + gnus-newsgroup-scored))
> + (when trace
> + (push (cons "A file" rule)
> + ;; Must be synced with `gnus-score-edit-file-at-point'.
> + gnus-score-trace))))))
>
> (defun gnus-advanced-score-rule (rule)
> "Apply RULE to `gnus-advanced-headers'."
> --
> 2.30.2
Lars, Eric,
Any comments? Is this good to go in?
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59458
; Package
emacs
.
(Thu, 24 Nov 2022 19:40:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 59458 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: Łukasz Stelmach <stlman <at> poczta.fm>
>> From: Łukasz Stelmach <stlman <at> poczta.fm>
>> Date: Mon, 21 Nov 2022 22:30:55 +0100
>>
>> * lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing
>> code outside of if so it's executed for both branches.
I'm not very familiar with this code (this is actually the first I'm
hearing of gnus-logic.el), so I hope Lars will chime in. It makes sense
that tracing should happen whether or not the rule matched? But what
about the sexp before that? Would we be pushing the mail-header-number
and new score to `gnus-newsgroup-score' only if the rule *wasn't*
successful?
I think this one should wait for Lars. If we don't hear from him and
it's holding things up, I can look more closely.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59458
; Package
emacs
.
(Thu, 07 Sep 2023 21:09:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 59458 <at> debbugs.gnu.org (full text, mbox):
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Cc: Łukasz Stelmach <stlman <at> poczta.fm>
>>> From: Łukasz Stelmach <stlman <at> poczta.fm>
>>> Date: Mon, 21 Nov 2022 22:30:55 +0100
>>>
>>> * lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing
>>> code outside of if so it's executed for both branches.
>
> I'm not very familiar with this code (this is actually the first I'm
> hearing of gnus-logic.el), so I hope Lars will chime in. It makes sense
> that tracing should happen whether or not the rule matched? But what
> about the sexp before that? Would we be pushing the mail-header-number
> and new score to `gnus-newsgroup-score' only if the rule *wasn't*
> successful?
>
> I think this one should wait for Lars. If we don't hear from him and
> it's holding things up, I can look more closely.
Eric,
It would be great if you could help review this. Thanks in advance.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59458
; Package
emacs
.
(Fri, 08 Sep 2023 06:06:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 59458 <at> debbugs.gnu.org (full text, mbox):
> From: Stefan Kangas <stefankangas <at> gmail.com>
> Date: Thu, 7 Sep 2023 14:07:57 -0700
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Lars Ingebrigtsen <larsi <at> gnus.org>, 59458 <at> debbugs.gnu.org,
> Łukasz Stelmach <stlman <at> poczta.fm>
>
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
> > Eli Zaretskii <eliz <at> gnu.org> writes:
> >
> >>> Cc: Łukasz Stelmach <stlman <at> poczta.fm>
> >>> From: Łukasz Stelmach <stlman <at> poczta.fm>
> >>> Date: Mon, 21 Nov 2022 22:30:55 +0100
> >>>
> >>> * lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing
> >>> code outside of if so it's executed for both branches.
> >
> > I'm not very familiar with this code (this is actually the first I'm
> > hearing of gnus-logic.el), so I hope Lars will chime in. It makes sense
> > that tracing should happen whether or not the rule matched? But what
> > about the sexp before that? Would we be pushing the mail-header-number
> > and new score to `gnus-newsgroup-score' only if the rule *wasn't*
> > successful?
> >
> > I think this one should wait for Lars. If we don't hear from him and
> > it's holding things up, I can look more closely.
>
> Eric,
>
> It would be great if you could help review this. Thanks in advance.
Adding Andrew, in case he could have some ideas or comments.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#59458
; Package
emacs
.
(Tue, 12 Sep 2023 00:08:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 59458 <at> debbugs.gnu.org (full text, mbox):
On 09/07/23 14:07 PM, Stefan Kangas wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>>>> Cc: Łukasz Stelmach <stlman <at> poczta.fm>
>>>> From: Łukasz Stelmach <stlman <at> poczta.fm>
>>>> Date: Mon, 21 Nov 2022 22:30:55 +0100
>>>>
>>>> * lisp/gnus/gnus-logic.el (gnus-score-advanced): Move the tracing
>>>> code outside of if so it's executed for both branches.
>>
>> I'm not very familiar with this code (this is actually the first I'm
>> hearing of gnus-logic.el), so I hope Lars will chime in. It makes sense
>> that tracing should happen whether or not the rule matched? But what
>> about the sexp before that? Would we be pushing the mail-header-number
>> and new score to `gnus-newsgroup-score' only if the rule *wasn't*
>> successful?
>>
>> I think this one should wait for Lars. If we don't hear from him and
>> it's holding things up, I can look more closely.
>
> Eric,
>
> It would be great if you could help review this. Thanks in advance.
I've taken a closer look, and I do think this is okay. The `when' after
the `dolist' only fires if the rule matches, the `if' is only there to
see if this article has been previously scored or not. So moving the
"(when trace" up to the top-level of the containing `when' (ie, out of the
`if') does look like the right thing to do.
Eric
Reply sent
to
Stefan Kangas <stefankangas <at> gmail.com>
:
You have taken responsibility.
(Tue, 12 Sep 2023 00:33:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Łukasz Stelmach <stlman <at> poczta.fm>
:
bug acknowledged by developer.
(Tue, 12 Sep 2023 00:33:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 59458-done <at> debbugs.gnu.org (full text, mbox):
Version: 30.1
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
> On 09/07/23 14:07 PM, Stefan Kangas wrote:
>
>> Eric,
>>
>> It would be great if you could help review this. Thanks in advance.
>
> I've taken a closer look, and I do think this is okay. The `when' after
> the `dolist' only fires if the rule matches, the `if' is only there to
> see if this article has been previously scored or not. So moving the
> "(when trace" up to the top-level of the containing `when' (ie, out of the
> `if') does look like the right thing to do.
Thanks. Installed it on master as commit e25ad6e2a30.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 10 Oct 2023 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 213 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.