all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#59458: [PATCH] Fix tracing for advanced scoring
@ 2022-11-21 21:30 Łukasz Stelmach
  2022-11-24  9:24 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Łukasz Stelmach @ 2022-11-21 21:30 UTC (permalink / raw)
  To: 59458; +Cc: Łukasz Stelmach

* 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






^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#59458: [PATCH] Fix tracing for advanced scoring
  2022-11-21 21:30 bug#59458: [PATCH] Fix tracing for advanced scoring Łukasz Stelmach
@ 2022-11-24  9:24 ` Eli Zaretskii
  2022-11-24 19:39   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2022-11-24  9:24 UTC (permalink / raw)
  To: Łukasz Stelmach, Lars Ingebrigtsen, Eric Abrahamsen; +Cc: 59458

> Cc: Łukasz Stelmach <stlman@poczta.fm>
> From: Łukasz Stelmach <stlman@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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#59458: [PATCH] Fix tracing for advanced scoring
  2022-11-24  9:24 ` Eli Zaretskii
@ 2022-11-24 19:39   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2022-11-24 19:39 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, 59458, Łukasz Stelmach

Eli Zaretskii <eliz@gnu.org> writes:

>> Cc: Łukasz Stelmach <stlman@poczta.fm>
>> From: Łukasz Stelmach <stlman@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.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-11-24 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-21 21:30 bug#59458: [PATCH] Fix tracing for advanced scoring Łukasz Stelmach
2022-11-24  9:24 ` Eli Zaretskii
2022-11-24 19:39   ` Eric Abrahamsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.