From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Eli Zaretskii <eliz@gnu.org>
Newsgroups: gmane.emacs.bugs
Subject: bug#61002: 28.2; Gnus - "Date" scoring scores all articles.
Date: Sat, 27 Jan 2024 11:30:36 +0200
Message-ID: <86ttmz86o3.fsf@gnu.org>
References: <878rhvhsyu.fsf@alfa.kjonca> <m2a5p0svwt.fsf@gmail.com>
 <m2plxwz1c8.fsf_-_@gmail.com>
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="11510"; mail-complaints-to="usenet@ciao.gmane.io"
Cc: kjonca@poczta.onet.pl, larsi@gnus.org, 61002@debbugs.gnu.org
To: Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?= <jecminek.k@gmail.com>,
 Eric Abrahamsen <eric@ericabrahamsen.net>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 27 10:31:13 2024
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rTf1s-0002pA-2H
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 27 Jan 2024 10:31:12 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1rTf1d-0006vg-M4; Sat, 27 Jan 2024 04:30:57 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rTf1b-0006tb-Na
 for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 04:30:56 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rTf1b-00041C-EZ
 for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 04:30:55 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rTf1h-0006k8-W7
 for bug-gnu-emacs@gnu.org; Sat, 27 Jan 2024 04:31:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Eli Zaretskii <eliz@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sat, 27 Jan 2024 09:31:01 +0000
Resent-Message-ID: <handler.61002.B61002.170634785625906@debbugs.gnu.org>
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.170634785625906
 (code B ref 61002); Sat, 27 Jan 2024 09:31:01 +0000
Original-Received: (at 61002) by debbugs.gnu.org; 27 Jan 2024 09:30:56 +0000
Original-Received: from localhost ([127.0.0.1]:53478 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rTf1b-0006jl-Ib
 for submit@debbugs.gnu.org; Sat, 27 Jan 2024 04:30:56 -0500
Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52700)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@gnu.org>) id 1rTf1Y-0006jW-K4
 for 61002@debbugs.gnu.org; Sat, 27 Jan 2024 04:30:53 -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 <eliz@gnu.org>)
 id 1rTf1L-000409-Pz; Sat, 27 Jan 2024 04:30:39 -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=8lkgVEUJLgsgMOelc6hHAT9OPlPdNUSXzi2Ddhvkv70=; b=QhF8KNFdLXsk+2trpb4p
 B4KB2wS+ofqpZqrlGD+Kgiy8VIvAXhFb1uYVnUo38UtlGisFYHk3ntXQUm5+KoJK0UvYVV52fhYWy
 XKMxRkG47+YW9eoV7dbM4ELJop08fGrq9MP6ILqZSOstFyL496OxH4dVMMd8eY/FoEOaHbe+e6xQc
 FPhsLJuTBuRUPQgUhZTb4LUi/F6rfbOiKXhDMwUnWxq4+kS0nF1yTk0q30xyutBJcLYmWMop7HfeA
 k+2uixM5yPI8OVqPdkTGYQEIXrBxNf357RN/wiCpOgC2ccu6Q5DGxMrdm+6rb0KNK8uGhBHsHC71w
 vBoRAlZZWMTs0w==;
In-Reply-To: <m2plxwz1c8.fsf_-_@gmail.com> (message from Jakub
 =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?= on Sat, 20 Jan 2024 12:33:11 +0100)
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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:278980
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/278980>

> 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:

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?= <jecminek.k@gmail.com>
> 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
> 
> 
> 
>