From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?= Newsgroups: gmane.emacs.bugs Subject: bug#61002: 28.2; Gnus - "Date" scoring scores all articles. Date: Sat, 20 Jan 2024 12:33:11 +0100 Message-ID: References: <878rhvhsyu.fsf@alfa.kjonca> 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="18882"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.1 Cc: Lars Ingebrigtsen , Kamil =?UTF-8?Q?Jo=C5=84ca?= To: 61002@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jan 20 12:34:09 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 1rR9c0-0004iE-5T for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 20 Jan 2024 12:34:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rR9bs-0004dW-79; Sat, 20 Jan 2024 06:34:00 -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 1rR9br-0004dE-6H for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2024 06:33:59 -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 1rR9bq-0008LI-UV for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2024 06:33:58 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rR9bt-0001hK-Lq for bug-gnu-emacs@gnu.org; Sat, 20 Jan 2024 06:34:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 20 Jan 2024 11:34:01 +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.17057504036453 (code B ref 61002); Sat, 20 Jan 2024 11:34:01 +0000 Original-Received: (at 61002) by debbugs.gnu.org; 20 Jan 2024 11:33:23 +0000 Original-Received: from localhost ([127.0.0.1]:33041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR9bG-0001g1-Vf for submit@debbugs.gnu.org; Sat, 20 Jan 2024 06:33:23 -0500 Original-Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]:52483) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rR9bF-0001fl-85 for 61002@debbugs.gnu.org; Sat, 20 Jan 2024 06:33:21 -0500 Original-Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5578485fc0eso1605828a12.1 for <61002@debbugs.gnu.org>; Sat, 20 Jan 2024 03:33:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1705750392; x=1706355192; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:cc :user-agent:references:in-reply-to:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=YEieEALTKwdjPE6z4muDQ0PoRw0cmzXd3uoBY02K1/Q=; b=R//Q7MIF5puKy2jonBOZ1pQeyfLFhTniSMr/vPr3iHN98GeLlLcmUAU/ythD3e6fvS cgx1tWpxhOfjRA8JnW11ejRKXH/RscBRi0lpqg69S4C+krvZqQcPGdmS3Z5Y9XzsgxvE FoHNcoYs/vUc/Mmgdr59n/G2L+/Uh5rB05AwI64IPXIcfVqDLPiwFZai7vIk6M/PdHr3 1QF3wMyZgTOGDk1DCknIO1DxvZajTdiYEhAa6UC7GJoj3MlXCbZL+lBZNuSfOo3SQETT FuQc4a47o9EBvZRAsv1WMbjp9FqBCDsWFZa2lkez3hW3YlhoK+9Y8r3Dj44/9KCRVcoX B/MQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705750392; x=1706355192; h=content-transfer-encoding:mime-version:message-id:date:cc :user-agent:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=YEieEALTKwdjPE6z4muDQ0PoRw0cmzXd3uoBY02K1/Q=; b=WDgCHNHapEEkjhWkg9k340TzrEZU801e7vLkDFAzAuZEwYrPPA50y2jJ8wd8R1mfZh 9vSrD2hOjGe/B3Wzp1kYcIjgaD+7guJChVvQVxD+fPfAyW1gpY3dWeVXnloiW1Tgronn VlIFeD9hJ12+XyV8SQ2FfUTAG4Od7vRO0VggjcMwa/NB9K5448Jb/PetArexTmT6dikq XYEWDlgqLKBJV3Ukj2A5FYGh0taD9qwKzpVKysw0+Ccsxs54EJ6EYJhQU86kOfMvoO7O 0ei5PLlNBCiD/1G/tGan3HH6fOrwUYN+N8ImK679TQPIIfH0/LVb0Dg0lGbfndoRioIm Nvkg== X-Gm-Message-State: AOJu0YxrqArFhsIIYtgGF5r2LPo44/H3o9AYYA7dDk8i1JuYnC/EU0kh K3UuvyHBtnbNh4sjsXScPCGUH2pP9Fp+YLn8SCahAd0rrSdtgDRJ X-Google-Smtp-Source: AGHT+IEvGvMdnl24AzaSw3m96+/J95tzznqmkMCHqL8Q/xpAKPGVj1C2BrYg2ilIB9E3NYIxuZn+vw== X-Received: by 2002:a05:6402:1d0c:b0:55a:fffe:440f with SMTP id dg12-20020a0564021d0c00b0055afffe440fmr278767edb.12.1705750392477; Sat, 20 Jan 2024 03:33:12 -0800 (PST) Original-Received: from Jakubs-MacBook-Air.local (ip-217-030-066-058.aim-net.cz. [217.30.66.58]) by smtp.gmail.com with ESMTPSA id d7-20020aa7c1c7000000b00559b9df8509sm5610029edp.81.2024.01.20.03.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Jan 2024 03:33:12 -0800 (PST) In-Reply-To: ("Jakub =?UTF-8?Q?Je=C4=8Dm=C3=ADnek?="'s message of "Sat, 20 Jan 2024 01:14:42 +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" 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:278597 Archived-At: 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: >From 0631de4d7be1d9891b3d42b77446ce6ea4d0c709 Mon Sep 17 00:00:00 2001 From: =3D?UTF-8?q?Jakub=3D20Je=3DC4=3D8Dm=3DC3=3DADnek?=3D 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 inv= alid 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 mean= ingful 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-st= andard 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-dat= e-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=C4=8Dm=C3=ADnek