GNU bug report logs -
#43270
27.1; [PATCH] Enhance gnus-score-date to support scoring by article age
Previous Next
Reported by: Alex Bochannek <alex <at> bochannek.com>
Date: Tue, 8 Sep 2020 08:43:01 UTC
Severity: normal
Tags: fixed, patch
Found in version 27.1
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> 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.
[gnus-score.el.diff (text/x-patch, inline)]
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))))
This bug report was last modified 4 years and 252 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.