emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 6c46ddd 1/2: Fix up < and > "date" scoring rules in Gnus


From: Lars Ingebrigtsen
Subject: master 6c46ddd 1/2: Fix up < and > "date" scoring rules in Gnus
Date: Thu, 10 Sep 2020 09:20:14 -0400 (EDT)

branch: master
commit 6c46dddcb25c959836d4b7ab1d6f174db5dff4b2
Author: Alex Bochannek <alex@bochannek.com>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix up < and > "date" scoring rules in Gnus
    
    * lisp/gnus/gnus-score.el (gnus-score-date): The previous < and >
    "date" scoring rules (added in the previous patch) had reversed
    logic (bug#43270).
    
    Copyright-paperwork-exempt: yes
---
 lisp/gnus/gnus-score.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index c5156a1..6a0e8ce 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1695,9 +1695,10 @@ score in `gnus-newsgroup-scored' by SCORE."
                  match (gnus-date-iso8601 (nth 0 kill))))
           ((eq type '<)
            (setq type 'after
-                 match-func 'gnus-string>
+                 match-func 'string<
                  match (gnus-time-iso8601
-                        (time-add (current-time) (* 86400 (nth 0 kill))))))
+                        (time-subtract (current-time)
+                                       (* 86400 (nth 0 kill))))))
           ((eq type 'before)
            (setq match-func 'gnus-string>
                  match (gnus-date-iso8601 (nth 0 kill))))
@@ -1705,7 +1706,8 @@ score in `gnus-newsgroup-scored' by SCORE."
            (setq type 'before
                  match-func 'gnus-string>
                  match (gnus-time-iso8601
-                        (time-add (current-time) (* -86400 (nth 0 kill))))))
+                        (time-subtract (current-time)
+                                       (* 86400 (nth 0 kill))))))
           ((eq type 'at)
            (setq match-func 'string=
                  match (gnus-date-iso8601 (nth 0 kill))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]