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

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Łukasz Stelmach <stlman@HIDDEN>; Keywords: patch; dated Mon, 21 Nov 2022 21:32:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 59458 <at> debbugs.gnu.org:


Received: (at 59458) by debbugs.gnu.org; 24 Nov 2022 19:39:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 14:39:50 2022
Received: from localhost ([127.0.0.1]:60258 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oyI4c-00010f-G2
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 14:39:50 -0500
Received: from mail.ericabrahamsen.net ([52.70.2.18]:32938)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eric@HIDDEN>) id 1oyI4a-00010R-0u
 for 59458 <at> debbugs.gnu.org; Thu, 24 Nov 2022 14:39:48 -0500
Received: from localhost (c-71-197-232-41.hsd1.wa.comcast.net [71.197.232.41])
 (Authenticated sender: eric@HIDDEN)
 by mail.ericabrahamsen.net (Postfix) with ESMTPSA id A3EDAFA08D;
 Thu, 24 Nov 2022 19:39:41 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net;
 s=mail; t=1669318782;
 bh=hyJLmwUPMi1URBnF1AU3DaZnNlVoIZeWb7I+sGHAWNY=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=kqGYQwrX7YQM++8YwNAfGD2Mo12n88atUHmJCeLgtPkyQ4CzmBfq1Tr3J/tBv12x3
 XQ4vEIRt8GJRsLKVgdMUs10L7jkm9L/45FQP3YyoRXrR32ikwNFRTe2rIe/o6YWbDh
 9efuXS1UqikShfVV1VuBRvLKvzyhSbAuaUqke6Ek=
From: Eric Abrahamsen <eric@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#59458: [PATCH] Fix tracing for advanced scoring
In-Reply-To: <831qpsyaar.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 24 Nov
 2022 11:24:44 +0200")
References: <20221121213055.2387178-1-stlman@HIDDEN>
 <831qpsyaar.fsf@HIDDEN>
Date: Thu, 24 Nov 2022 11:39:40 -0800
Message-ID: <877czkf8g3.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59458
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 59458 <at> debbugs.gnu.org,
 =?utf-8?Q?=C5=81ukasz?= Stelmach <stlman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Eli Zaretskii <eliz@HIDDEN> writes:

>> Cc: =C5=81ukasz Stelmach <stlman@HIDDEN>
>> From: =C5=81ukasz Stelmach <stlman@HIDDEN>
>> Date: Mon, 21 Nov 2022 22:30:55 +0100
>>=20
>> * 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@HIDDEN:
bug#59458; Package emacs. Full text available.

Message received at 59458 <at> debbugs.gnu.org:


Received: (at 59458) by debbugs.gnu.org; 24 Nov 2022 09:24:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 24 04:24:37 2022
Received: from localhost ([127.0.0.1]:57271 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oy8TF-0004k3-Hd
	for submit <at> debbugs.gnu.org; Thu, 24 Nov 2022 04:24:37 -0500
Received: from eggs.gnu.org ([209.51.188.92]:49934)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1oy8TD-0004jo-B4
 for 59458 <at> debbugs.gnu.org; Thu, 24 Nov 2022 04:24:36 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oy8T6-0001V3-LQ; Thu, 24 Nov 2022 04:24:28 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=yxghuoB3BLo2PyHuSfbJM3dv0wdAHfkd6K++8y+oLCs=; b=IX6OwdjcK61Wn09xDrzG
 TQJGc4dJUm0cZsXnqma6i9+r/zbRIeuyL9hFFcacpvfLb7X7xLLSrt6BNSPNImBe/wTpIlGMrEn7+
 NFzi3KuT70audjj5jvgA+Pcd3i9ENdef9ZwYXJkv2cGHSHFQKt4jaOo0n3uXn6upWGAJBgZIn3TEI
 hAAc8dPBGe3102PHt0xnCuX54b+/IAUZlFQCJd9ovbG1G0U2mRGlbtkKtw9gvIEHJqMih6d4AY71G
 0gMeN9sMOAgpZ0O912cqSGSkW+EjGZRwfFed1N3WktAW2h3aCZQAdwYGJhhEc2cUh9q+sf2GstsCs
 eSLacHRQqzCTuQ==;
Received: from [87.69.77.57] (helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1oy8T4-0004sm-NY; Thu, 24 Nov 2022 04:24:27 -0500
Date: Thu, 24 Nov 2022 11:24:44 +0200
Message-Id: <831qpsyaar.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: =?utf-8?Q?=C5=81ukasz?= Stelmach <stlman@HIDDEN>, Lars Ingebrigtsen
 <larsi@HIDDEN>, Eric Abrahamsen <eric@HIDDEN>
In-Reply-To: <20221121213055.2387178-1-stlman@HIDDEN> (message from
 =?utf-8?Q?=C5=81ukasz?=
 Stelmach on Mon, 21 Nov 2022 22:30:55 +0100)
Subject: Re: bug#59458: [PATCH] Fix tracing for advanced scoring
References: <20221121213055.2387178-1-stlman@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 59458
Cc: 59458 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Łukasz Stelmach <stlman@HIDDEN>
> From: Łukasz Stelmach <stlman@HIDDEN>
> 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@HIDDEN:
bug#59458; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2022 21:31:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 21 16:31:32 2022
Received: from localhost ([127.0.0.1]:49013 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1oxEO4-0007QD-FZ
	for submit <at> debbugs.gnu.org; Mon, 21 Nov 2022 16:31:32 -0500
Received: from lists.gnu.org ([209.51.188.17]:39226)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stlman@HIDDEN>) id 1oxEO2-0007Q5-7C
 for submit <at> debbugs.gnu.org; Mon, 21 Nov 2022 16:31:31 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <stlman@HIDDEN>) id 1oxEO1-0000Tc-VR
 for bug-gnu-emacs@HIDDEN; Mon, 21 Nov 2022 16:31:30 -0500
Received: from smtpo50.interia.pl ([217.74.67.50])
 by eggs.gnu.org with esmtps (TLS1.2:RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <stlman@HIDDEN>) id 1oxENz-0000xG-3d
 for bug-gnu-emacs@HIDDEN; Mon, 21 Nov 2022 16:31:29 -0500
Received: from localhost (89-64-89-35.dynamic.chello.pl [89.64.89.35])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest
 SHA256) (No client certificate requested)
 by www.poczta.fm (INTERIA.PL) with ESMTPSA;
 Mon, 21 Nov 2022 22:31:18 +0100 (CET)
From: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <stlman@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Fix tracing for advanced scoring
Date: Mon, 21 Nov 2022 22:30:55 +0100
Message-Id: <20221121213055.2387178-1-stlman@HIDDEN>
X-Mailer: git-send-email 2.30.2
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interia.pl;
 s=biztos; t=1669066280;
 bh=mUENPalVoUdYAl0MIPTQZeXEl4PSEqoIRADWgux7gIg=;
 h=From:To:Subject:Date:Message-Id:MIME-Version;
 b=qf5t/1V3Ch4mhhvokDcb7e8DMJE21eY7LYur4+40DsNoSRjrxYHicXPDXlWs050r+
 HNNQ8s0hXbeYgwRBsWDFvvzP7K5vysyVz3t34ACRoNjwtqZGHCa5hkjts9PIs/GJ22
 GfISY3ltac1hQPy29k9Ecvgw9VE/S6j5qHkakxpo=
Received-SPF: pass client-ip=217.74.67.50; envelope-from=stlman@HIDDEN;
 helo=smtpo50.interia.pl
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: =?UTF-8?q?=C5=81ukasz=20Stelmach?= <stlman@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

* 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





Acknowledgement sent to Łukasz Stelmach <stlman@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#59458; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 24 Nov 2022 19:45:02 UTC

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