From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alex Bochannek Newsgroups: gmane.emacs.bugs Subject: bug#70134: [PATCH] Show all date options when adding Gnus scores interactively Date: Mon, 06 May 2024 19:53:35 -0700 Message-ID: References: <87edbovjvj.fsf@kubajecminek.cz> <86bk6dr8wi.fsf@gnu.org> <87jzkqjclv.fsf@ericabrahamsen.net> <87le4tz61f.fsf@kubajecminek.cz> 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="39243"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eric Abrahamsen , 70134@debbugs.gnu.org, eliz@gnu.org, larsi@gnus.org, Richard Stallman To: Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 07 04:55:02 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 1s4Ayr-000A0N-J3 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 May 2024 04:55:01 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4Ayb-0006fq-FX; Mon, 06 May 2024 22:54:45 -0400 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 1s4AyU-0006fA-Cs for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 22:54:40 -0400 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 1s4AyU-0007DM-3r for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 22:54:38 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4Ays-0002vS-BY for bug-gnu-emacs@gnu.org; Mon, 06 May 2024 22:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alex Bochannek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 May 2024 02:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70134 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70134-submit@debbugs.gnu.org id=B70134.171505046311223 (code B ref 70134); Tue, 07 May 2024 02:55:02 +0000 Original-Received: (at 70134) by debbugs.gnu.org; 7 May 2024 02:54:23 +0000 Original-Received: from localhost ([127.0.0.1]:41659 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4AyD-0002uw-BO for submit@debbugs.gnu.org; Mon, 06 May 2024 22:54:23 -0400 Original-Received: from ns.lapseofthought.com ([50.0.39.240]:49285 helo=mail.lapseofthought.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4Axx-0002ud-CW for 70134@debbugs.gnu.org; Mon, 06 May 2024 22:54:20 -0400 Original-Received: from awb-mbp.local (c-24-23-131-202.hsd1.ca.comcast.net [24.23.131.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.lapseofthought.com (Postfix) with ESMTPSA id 4VYNBm5Kxrz3q40m; Mon, 6 May 2024 19:53:36 -0700 (PDT) Authentication-Results: ORIGINATING; auth=pass smtp.auth=alex smtp.mailfrom=alex@bochannek.com In-Reply-To: <87le4tz61f.fsf@kubajecminek.cz> ("Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?="'s message of "Wed, 01 May 2024 19:27:44 +0000") 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:284619 Archived-At: Jakub, I finally had some time to look at these changes, apologies for the delay. Jakub Je=C4=8Dm=C3=ADnek writes: > "Alex Bochannek" writes: >> As Jakub mentioned, I am the author of that part of the Gnus scoring >> code. I have not had a chance to look at the proposed patch, but I agree >> that some explanations would be useful. I can look it over this weekend. > > Thank you, your review is appreciated. Please do you happen to remember I like the approach and tested them out. The legal-types change in gnus-summary-increase-score is straightforward and makes sense to me. I have one stylistic comment: (nthcdr 3 s) seems to be easier to read to me than (cdddr s), but I have no strong opinions on that. > why you used this form > > (string=3D "date" (nth 0 (assoc header gnus-header-index))) > > instead of this > > (string=3D header "date") My suspicion is that this started out as a copy of the integer comparison right above that code and I never cleaned it up. Yes, feel free to simplify, I don't remember any good reason why it needs to pick apart a list. It also seems perfectly fine to remove the (eq type 'after) etc. stuff, it's not necessary anymore. The rest of the changes in gnus-summary-score-entry look good. I think some more help text or additional documentation about the defaults would be useful. It gets a bit confusing what you are prompted for. Having said that, I like the idea of pulling a default date from the current message, it just surprised me. I also think I might have found a bug in how the dates are written out to the SCORE file. I interactively increased the score in the order of <, r, n, b, and n as you can see below. Only the b, a, and n entries get converted to the list format with the un-evaluated gnus-time after another entry is written. Meaning the second and third entry below, the "before" and "at," looked just like the topmost "at" entry before the following entry was written. ("date" ("20240501" nil nil at) (#("20240502" 0 1 (gnus-time (26163 14832))) nil nil before) (#("20240503T145117" 0 1 (gnus-time (26165 23637))) nil nil at) (".*T031840" nil nil r) (2 nil nil <) > Thanks! Hope this is useful! --=20 Alex.