From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. Date: Sat, 10 Feb 2024 10:07:48 +0200 Message-ID: <86h6igvj1n.fsf@gnu.org> References: <878rhvhsyu.fsf@alfa.kjonca> <86ttmz86o3.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26131"; mail-complaints-to="usenet@ciao.gmane.io" Cc: kjonca@poczta.onet.pl, larsi@gnus.org, jecminek.k@gmail.com, 61002@debbugs.gnu.org To: eric@ericabrahamsen.net, Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 10 09:08:59 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 1rYiPy-0006VT-0o for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Feb 2024 09:08:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rYiPo-0006db-UP; Sat, 10 Feb 2024 03:08:48 -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 1rYiPn-0006dC-LZ for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:08: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 1rYiPn-0003sn-8K for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:08:47 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rYiQ2-00034b-Fk for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 03:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Feb 2024 08:09: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.170755249511694 (code B ref 61002); Sat, 10 Feb 2024 08:09:02 +0000 Original-Received: (at 61002) by debbugs.gnu.org; 10 Feb 2024 08:08:15 +0000 Original-Received: from localhost ([127.0.0.1]:51014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYiPH-00032U-1h for submit@debbugs.gnu.org; Sat, 10 Feb 2024 03:08:15 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34774) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rYiPE-000321-9X for 61002@debbugs.gnu.org; Sat, 10 Feb 2024 03:08:13 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rYiOs-0003aD-Ot; Sat, 10 Feb 2024 03:07:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=/3VufkFapXmwZOGfwhXCGn6TVDW0a06TrhKYIWamoeI=; b=sIauxBHOTa0jVKcGjW+h zoEcmHIKHOawcADTSrzW8KpQgxWXmO3IPCS2/9zzgWENXcYqgO4xSAT0CnFApyvOfB1Jo/xUhhEIp 6KB9949oCkivmnb5DwhZbGaLsPf/4FTGVuWYrTML5t/0xc+BtpidaeG9YxcHMJzVe4tFY8hax04s4 MlEF5Pxk/tX99M3fSuxKhwVQQxvRbXgL0gJ1Nn45XLCfLry78eAcWGPU3gp6a5JLjaMThES0Ow1yK 9Rz98u3ReegXeEudrq9Ij3FwiA9USCPOYjVrwc5K52PA68OMTBiCDyoDU9YlO4rX0np/B7ufJNkrH ZkOQ9vqQUQovzQ==; In-Reply-To: <86ttmz86o3.fsf@gnu.org> (message from Eli Zaretskii on Sat, 27 Jan 2024 11:30:36 +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:279724 Archived-At: 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 > > > From: Jakub Ječmínek > > Date: Sat, 20 Jan 2024 12:33:11 +0100 > > Cc: Lars Ingebrigtsen , > > Kamil Jońca > > > > 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: > > Eric, Lars: any comments? Should this be installed? > > > > > >From 0631de4d7be1d9891b3d42b77446ce6ea4d0c709 Mon Sep 17 00:00:00 2001 > > From: =?UTF-8?q?Jakub=20Je=C4=8Dm=C3=ADnek?= > > Date: Sat, 20 Jan 2024 00:51:03 +0100 > > Subject: [PATCH] Provide valid match element for date key during interactive > > gnus-summary-increase-score > > > > * lisp/gnus/gnus-score.el (gnus-summary-score-entry): The user is given invalid > > default match element value during interactive use of gnus-summary-increase-score > > and gnus-summary-lower-score (date key). We fix that by providing more meaningful > > default value - number of days between today and entry at point. > > --- > > lisp/gnus/gnus-score.el | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el > > index bd19e7d7cd7..46ccb14751d 100644 > > --- a/lisp/gnus/gnus-score.el > > +++ b/lisp/gnus/gnus-score.el > > @@ -895,7 +895,11 @@ If optional argument `EXTRA' is non-nil, it's a non-standard overview header." > > (if (< score 0) "lower" "raise")) > > (if (numberp match) > > (int-to-string match) > > - match)))) > > + (int-to-string > > + (- > > + (/ (car (time-convert (current-time) 1)) 86400) > > + (/ (car (time-convert (gnus-date-get-time (gnus-date-iso8601 match)) 1)) > > + 86400))))))) > > > > ;; If this is an integer comparison, we transform from string to int. > > (if (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) > > -- > > 2.39.3 (Apple Git-145) > > > > Best, > > > > Jakub Ječmínek > > > > > > > > > > > >