[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#61002: 28.2; Gnus - "Date" scoring scores all articles.
From: |
Eli Zaretskii |
Subject: |
bug#61002: 28.2; Gnus - "Date" scoring scores all articles. |
Date: |
Sat, 10 Feb 2024 10:07:48 +0200 |
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 <eliz@gnu.org>
>
> > 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
> >
> >
> >
> >
>
>
>
>
- bug#61002: 28.2; Gnus - "Date" scoring scores all articles.,
Eli Zaretskii <=