GNU bug report logs - #59458
[PATCH] Fix tracing for advanced scoring

Previous Next

Package: emacs;

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.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#59458: closed ([PATCH] Fix tracing for advanced scoring)
Date: Tue, 12 Sep 2023 00:33:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 11 Sep 2023 17:32:20 -0700
with message-id <CADwFkmkd-YYZi+haPN0PEWVdCZXpvfV7YJyQVxtKK9Lv_9LPbA <at> mail.gmail.com>
and subject line Re: bug#59458: [PATCH] Fix tracing for advanced scoring
has caused the debbugs.gnu.org bug report #59458,
regarding [PATCH] Fix tracing for advanced scoring
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
59458: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59458
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Łukasz Stelmach <stlman <at> poczta.fm>
To: bug-gnu-emacs <at> gnu.org
Cc: Łukasz Stelmach <stlman <at> poczta.fm>
Subject: [PATCH] Fix tracing for advanced scoring
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



[Message part 3 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 59458-done <at> debbugs.gnu.org,
 Lars Ingebrigtsen <larsi <at> gnus.org>,
 Łukasz Stelmach <stlman <at> poczta.fm>
Subject: Re: bug#59458: [PATCH] Fix tracing for advanced scoring
Date: Mon, 11 Sep 2023 17:32:20 -0700
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.


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

Previous Next


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