GNU bug report logs -
#61002
28.2; Gnus - "Date" scoring scores all articles.
Previous Next
Reported by: Kamil Jońca <kjonca <at> poczta.onet.pl>
Date: Sun, 22 Jan 2023 08:31:02 UTC
Severity: normal
Found in version 28.2
Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 61002 <at> debbugs.gnu.org (full text, mbox):
Eli Zaretskii <eliz <at> gnu.org> writes:
> Ping!
>
>> Cc: kjonca <at> poczta.onet.pl, larsi <at> gnus.org, 61002 <at> debbugs.gnu.org
>> Date: Sat, 27 Jan 2024 11:30:36 +0200
>> From: Eli Zaretskii <eliz <at> gnu.org>
>>
>> > From: Jakub Ječmínek <jecminek.k <at> gmail.com>
>> > Date: Sat, 20 Jan 2024 12:33:11 +0100
>> > Cc: Lars Ingebrigtsen <larsi <at> gnus.org>,
>> > Kamil Jońca <kjonca <at> poczta.onet.pl>
>> >
>> > I've made huge mistake in my previous patch (now everyone will know
>> > that I'm terrible programmer).
>> >
>> > Here's working solution of what I'm proposing:
Thanks for the ping. TBH I've never used scoring in Gnus, so this is new
territory for me. I tried the patch and it worked correctly, but...
The patch is doing this:
(gnus-date-get-time (gnus-date-iso8601 match))
This is the definition of `gnus-date-iso8601':
(defun gnus-date-iso8601 (date)
"Convert the DATE to YYYYMMDDTHHMMSS."
(condition-case ()
(gnus-time-iso8601 (gnus-date-get-time date))
(error "")))
So error handling aside, the patch ends up doing the equivalent of:
(let ((ds "Sun, 22 Jan 2023 09:30:17 +0100"))
(gnus-date-get-time
(gnus-time-iso8601
(gnus-date-get-time ds))))
which effectively round-trips the date string through two different
formats. Given that this is just providing a reasonable default value
for a user prompt, I think we should just keep the inner
`gnus-date-get-time' call, and wrap the whole `int-to-string' form in a
`condition-case'. If anything at all goes wrong we really don't care, we
can just skip it and return a "1" or something.
WDYT?
This bug report was last modified 1 year and 148 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.