Subject: bug#42334: 28.0.50; gnus-thread-sort-functions vs. loose threads

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 19 Jul 2020 02:13:38 +0200

Kévin Le Gouguec <[email-masked]> writes:

> Is this indeed a bug, or am I missing something?

It's an artefact of the way Gnus does these things.  This is the code:

	   (gnus-sort-gathered-threads
	    (funcall gnus-summary-thread-gathering-function
		     (gnus-sort-threads
		      (gnus-cut-threads (gnus-make-threads)))))

First we sort the threads, then we gather loose threads, and then we
sort the loose threads individually.

So there's no way to do sorting (globally) after the threads have been
gathered.

Changing the order all this happens in would be possible, but it would
change how this all behaves.  So to fix this, we'd have to add yet
another sort -- on the outside, after doing all this, and this would
require a new set of sorting predicates, because the structure of a
gathered thread is different than the structure of a normal thread.

So you couldn't use gnus-thread-sort-by-most-recent-date and the like
for that top-level sorting thing.

So I don't think adding this functionality is worth it, although it's
something that's been requested a few times, and I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no