From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. Date: Sat, 10 Feb 2024 09:27:35 -0800 Message-ID: <87bk8oz0u0.fsf@ericabrahamsen.net> References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> <86h6igvj1n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31692"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: jecminek.k@gmail.com, larsi@gnus.org, kjonca@poczta.onet.pl, 61002@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 18:40:58 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rYrLW-00085g-Kx for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 18:40:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYrLN-000772-Do; Sat, 10 Feb 2024 12:40:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYrLL-00076Q-Fc for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 12:40:47 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rYrLL-0006dM-2f for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 12:40:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYrLa-0003AQ-B0 for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 12:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2024 17:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61002 X-GNU-PR-Package: emacs Original-Received: via spool by 61002-submit@debbugs.gnu.org id=B61002.170758681712036 (code B ref 61002); Sat, 10 Feb 2024 17:41:02 +0000 Original-Received: (at 61002) by debbugs.gnu.org; 10 Feb 2024 17:40:17 +0000 Original-Received: from localhost ([127.0.0.1]:57164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrKq-00037v-GT for submit@debbugs.gnu.org; Sat, 10 Feb 2024 12:40:17 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:36856) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYrEK-0002nB-DM for 61002@debbugs.gnu.org; Sat, 10 Feb 2024 12:33:33 -0500 Original-Received: from localhost (71-212-21-65.tukw.qwest.net [71.212.21.65]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 5A9C2FA011; Sat, 10 Feb 2024 17:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1707586056; bh=VV7E9fn52sKe7+TqQPXFRackS8W4aDdx7KlZMT91O0c=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=mWiC82wjE7m36faFx15GG84JoyHO6C9aOe3en55pdgcqaqAf2uAJUqrrTMt+PxnTu evNNCtn1zZkYlkMLl/1Lfup4UEJe2ptF+oSVWvJJerJdt61vpJXsowM8BzL77exeS+ vM8VOuDCq0lpvvvo2rNrWM5ao+bp2iJ/hh5Wgtmg= In-Reply-To: <86h6igvj1n.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 10 Feb 2024 10:07:48 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:279769 Archived-At: Eli Zaretskii 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 >>=20 >> > From: Jakub Je=C4=8Dm=C3=ADnek >> > Date: Sat, 20 Jan 2024 12:33:11 +0100 >> > Cc: Lars Ingebrigtsen , >> > Kamil Jo=C5=84ca >> >=20 >> > I've made huge mistake in my previous patch (now everyone will know >> > that I'm terrible programmer). >> >=20 >> > 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?