From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jecminek.k@gmail.com, larsi@gnus.org, kjonca@poczta.onet.pl,
61002@debbugs.gnu.org
Subject: bug#61002: 28.2; Gnus - "Date" scoring scores all articles.
Date: Sat, 10 Feb 2024 09:27:35 -0800 [thread overview]
Message-ID: <87bk8oz0u0.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <86h6igvj1n.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2024 10:07:48 +0200")
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?
next prev parent reply other threads:[~2024-02-10 17:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-22 8:30 bug#61002: 28.2; Gnus - "Date" scoring scores all articles Kamil Jońca
2024-01-20 0:14 ` bug#61002: [PATCH] " Jakub Ječmínek
2024-01-20 11:33 ` Jakub Ječmínek
2024-01-27 9:30 ` Eli Zaretskii
2024-02-10 8:07 ` Eli Zaretskii
2024-02-10 17:27 ` Eric Abrahamsen [this message]
2024-02-12 15:58 ` Jakub Ječmínek
2024-02-17 17:41 ` Eric Abrahamsen
2024-02-17 18:18 ` Philip Kaludercic
2024-02-17 18:23 ` Philip Kaludercic
2024-02-17 18:41 ` Eric Abrahamsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bk8oz0u0.fsf@ericabrahamsen.net \
--to=eric@ericabrahamsen.net \
--cc=61002@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jecminek.k@gmail.com \
--cc=kjonca@poczta.onet.pl \
--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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.