From: Alex Bochannek <alex@bochannek.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 43270@debbugs.gnu.org
Subject: bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age
Date: Wed, 09 Sep 2020 16:59:03 -0700 [thread overview]
Message-ID: <m2blie33js.fsf@bochannek.com> (raw)
In-Reply-To: <878sdk7g1h.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 08 Sep 2020 11:51:06 +0200")
[-- Attachment #1: Type: text/plain, Size: 822 bytes --]
Lars Ingebrigtsen <larsi@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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Fix inverted logic in gnus-score-date when scoring by less-than date --]
[-- Type: text/x-patch, Size: 938 bytes --]
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))))
next prev parent reply other threads:[~2020-09-09 23:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-08 1:28 bug#43270: 27.1; [PATCH] Enhance gnus-score-date to support scoring by article age Alex Bochannek
2020-09-08 9:51 ` Lars Ingebrigtsen
2020-09-09 23:59 ` Alex Bochannek [this message]
2020-09-10 13:16 ` Lars Ingebrigtsen
2020-09-11 0:58 ` Alex Bochannek
2020-09-11 12:17 ` Lars Ingebrigtsen
2020-09-12 6:14 ` Alex Bochannek
2020-09-12 12:04 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2blie33js.fsf@bochannek.com \
--to=alex@bochannek.com \
--cc=43270@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).