Subject: bug#75329: 30.0.93; gnus: lowering thread score doesn't work on e-mail threads (...?)

From: Mike Kupfer <[email-masked]>
Date: Thu, 09 Jan 2025 11:26:54 -0800

Christopher Howard wrote:

> One issue for me here is how to get to the start of the thread
> quickly, since the actual start of the thread might be hidden. I
> suppose I could run (gnus-summary-insert-old-articles t) and then
> (gnus-summary-top-thread). But I know that
> gnus-summary-insert-old-articles can take a really long time in an
> IMAP summary buffer so I'm not sure if that is really practical. I
> guess I could do something like (gnus-summary-insert-old-articles 200)
> instead and hope that is good enough. Any thoughts on this?

Hmm.  My experience with Gnus and IMAP is several years old, but yes, I
remember it being slow.

I've never used thread scoring before, so all I know is what the
documentation says and the results of my limited testing.  Based on
that, I'd say that if you score down on an article that is 200 messages
back, Gnus might not catch all the messages in the thread, but it might
catch most of them, depending on how much the conversation has branched
(i.e., how many subthreads there are) and how many other unrelated
threads appear in that set of 200.  (If there are a lot of unrelated
messages, you'll get worse results than if most of the 200 is from the
same thread.)  If you come across a new subthread, you could manually
score it down.  If there aren't a lot of subthreads, that might be good
enough.

In the rest of this email, I'll describe the workflow that I use with
Gnus.  It might be overkill for your needs, but it might reduce the need
to identify and score down subthreads.

I have the following in my Emacs configuration:

(setq gnus-thread-score-function 'mdk-avg)

(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
	gnus-thread-sort-by-total-score))

(defun mdk-avg (&rest l)
  "Return the average of a set of numbers.  Will use integer division
  unless one or more of the numbers is floating point."
  (/ (apply '+ l) (length l)))

So if a thread has a lot of low-score messages, it will appear later in
the summary buffer than a thread with higher-scored messages.

When reading a new batch of email, I first limit to messages whose score
is above a particular threshold, and I pay closer attention to those.  I
then remove the limit and skim until I get to threads that mostly have
negative-scored messages.  I then press "x" to clear the visual clutter,
and I skim what's left.  At the bottom of the buffer, I use "M H" to
mark everything left as read.

mike