Subject: Re: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age

From: Alex Bochannek <[email-masked]>
Date: Wed, 09 Sep 2020 16:59:03 -0700

Lars Ingebrigtsen <[email-masked]> writes:

> The .info files are generated files -- the documentation goes into
> doc/misc/gnus.texi (and I expanded upon the feature somewhat based on
> your email).

Thanks for the reminder, forgot about that.

Looks like I inverted the logic for '<'. New patch attached.

> The patch is just small enough to go through without a copyright
> assignment (and I forgot to mark the commit as such; sigh), but for any
> future patches you might send, we'd need to have the copyright assigned
> to the FSF.  Would you be willing to do that?  If so, we could start the
> ball rolling now on the paperwork, so that any subsequent patches can be
> applied faster.

I believe my employer is already on file, so if there are any more
substantial contributions, I can use that.

Thanks!

-- 
Alex.
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index c5156a195a..12f733ac13 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1695,9 +1695,9 @@ gnus-score-date
 		  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 +1705,7 @@ gnus-score-date
 	    (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))))