help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting with threads in Gnus


From: Eric Abrahamsen
Subject: Re: Sorting with threads in Gnus
Date: Tue, 30 Jul 2013 18:53:38 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Tassilo Horn <tsdh@gnu.org> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>>> That's actually the same as the order I had before my latest change,
>>> but maybe that was only a coincidence.  At least it seems more
>>> correct to explicitly sort subthreads chronologically instead of not
>>> sorting them at all.
>>
>> I think it defaults to sorting by article number, which often looks a
>> lot like date -- docs seem to say that one is dependent on when the
>> message is sent, and the other on when it arrives...
>
> Yeah, but my code stopped sorting of subthreads at all.  So I basically
> assumed that the threads were sorted according to article number before
> they were passed to the thread sorting functions.  That's probably a
> false assumption.
>
> Anyway, my last changes made the name `gnus-sort-threads-recursively'
> inappropriate.  And also it was only a minor step away from custom
> subthread sorting.  So now I've implemented that:
>
> ,----
> | commit fff80f88ef397fca65cb382217ce9c9a08b1329e
> | Author: Tassilo Horn <tsdh@gnu.org>
> | Date:   Tue Jul 30 09:52:15 2013 +0200
> | 
> |     Make subthread sorting customizable and add docs for it.
> |     
> |     * gnus-sum.el (gnus-subthread-sort-functions): New defcustom.
> |     (gnus-sort-threads-recursively): Delete defcustom.
> |     (gnus-sort-threads-recursive): Adapt accordingly.
> |     
> |     * gnus.texi (Sorting the Summary Buffer): Document new defcustom
> |     `gnus-subthread-sort-functions' and remove the obsolete documentation
> |     of `gnus-sort-threads-recursively'.
> | 
> `----
>
> So `gnus-sort-threads-recursively' is gone now, and
> `gnus-subthread-sort-functions' takes its place.  By default its value
> is 'gnus-thread-sort-functions which means to sort subthreads also using
> `gnus-thread-sort-functions', but you can set it to any list of sort
> functions you want.
>
> So now I use this:
>
> (setq gnus-thread-sort-functions '(gnus-thread-sort-by-number
>                                  gnus-thread-sort-by-most-recent-date
>                                  gnus-thread-sort-by-total-score)
>       gnus-subthread-sort-functions '(gnus-thread-sort-by-number
>                                     gnus-thread-sort-by-date)
>       gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date)
>
> So threads are sorted from highest score/most recent article to lowest
> score/least recent article, but inside threads I simply sort from old to
> new.

Very cool! I'll make use of this.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]