[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61002: 28.2; Gnus - "Date" scoring scores all articles.
From: |
Eric Abrahamsen |
Subject: |
bug#61002: 28.2; Gnus - "Date" scoring scores all articles. |
Date: |
Sat, 10 Feb 2024 09:27:35 -0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
> Ping!
>
>> Cc: kjonca@poczta.onet.pl, larsi@gnus.org, 61002@debbugs.gnu.org
>> Date: Sat, 27 Jan 2024 11:30:36 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>>
>> > From: Jakub Ječmínek <jecminek.k@gmail.com>
>> > Date: Sat, 20 Jan 2024 12:33:11 +0100
>> > Cc: Lars Ingebrigtsen <larsi@gnus.org>,
>> > Kamil Jońca <kjonca@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?