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: Fri, 26 Jul 2013 17:01:48 +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:
>
> Hi Eric,
>
>>> However, as soon as I add `gnus-thread-sort-by-total-score' and
>>> `gnus-thread-sort-by-most-recent-date' to
>>> `gnus-thread-sort-functions', the sorting inside threads goes wonky
>>> as well...
>>
>> I doubt I'll be able to help -- I don't use scoring, and most of my gnus
>> configurations seem to involve some degree of magical thinking.
>>
>> Just for clarity, your desired setup, that goes "wonky", would look like
>> this:
>>
>> (setq gnus-thread-sort-functions
>>       '(gnus-thread-sort-by-total-score
>>         gnus-thread-sort-by-most-recent-date)
>>       gnus-sort-gathered-threads-function
>>       'gnus-thread-sort-by-date)
>>
>> Is that right?
>
> Not quite.  I think that would be my perfect setup:
>
> (setq gnus-thread-sort-functions
>       '(gnus-thread-sort-by-number
>         gnus-thread-sort-by-date
>       gnus-thread-sort-by-most-recent-date
>         gnus-thread-sort-by-total-score)
>       gnus-sort-gathered-threads-function 'gnus-thread-sort-by-date)
>
>> So it's the 'gnus-thread-sort-by-date effect inside the threads
>> themselves that's going wrong? Wonky how?
>
> I don't really see its effect.  With
> `gnus-sort-gathered-threads-function' set to the default value
> `gnus-thread-sort-by-number' I get the same sorting order.
>
> The problem is that Gnus seems to sort threads and also subthreads with
> `gnus-thread-sort-functions'.  So in my case, high-score subthreads will
> come before low-score subthreads, and when the score is equal,
> subthreads with more recent articles will come before subthreads with
> older recent articles.  But inside threads, I want sorting to be
> strictly chronological from old to new.
>
> For example, below Y should be before the subthread X, because it's
> older.
>
> O ┃  ┃Juanma Barranquero     ┃ ╭●  frame size&position woes <Jul 21 2013 
> 14:56>
> O ┃  ┃martin rudalics        ┃ ├──❯   <Jul 21 2013 16:03>               ;; X
> O ┃  ┃Juanma Barranquero     ┃ │╰──❯   <Jul 21 2013 17:42>
> O ┃  ┃martin rudalics        ┃ │ ├──❯   <Jul 22 2013 10:22>
> O ┃  ┃Juanma Barranquero     ┃ │ │╰──❯   <Jul 22 2013 11:40>
> O ┃  ┃Eli Zaretskii          ┃ │ │ ╰──❯   <Jul 22 2013 17:52>
> O ┃  ┃Juanma Barranquero     ┃ │ │  ╰──❯   <Jul 22 2013 22:36>
> O ┃  ┃Eli Zaretskii          ┃ │ │   ╰──❯   <Jul 23 2013 04:45>
> O ┃  ┃Juanma Barranquero     ┃ │ │    ╰──❯   <Jul 24 2013 01:47>
> O ┃  ┃Eli Zaretskii          ┃ │ │     ╰──❯   <Jul 24 2013 05:55>
> O ┃  ┃Juanma Barranquero     ┃ │ │      ╰──❯   <Jul 24 2013 12:42>
> O ┃  ┃Eli Zaretskii          ┃ │ │       ╰──❯   <Jul 24 2013 16:37>
> O ┃  ┃Juanma Barranquero     ┃ │ │        ╰──❯   <Jul 24 2013 16:51>
> O ┃  ┃Eli Zaretskii          ┃ │ │         ╰──❯   <Jul 24 2013 18:55>
> O ┃  ┃Juanma Barranquero     ┃ │ │          ╰──❯   <Jul 24 2013 19:01>
> O ┃  ┃Eli Zaretskii          ┃ │ │           ╰──❯   <Jul 24 2013 19:41>
> O ┃  ┃Juanma Barranquero     ┃ │ │            ╰──❯   <Jul 24 2013 19:49>
> O ┃  ┃Juanma Barranquero     ┃ │ ╰──❯   <Jul 21 2013 17:58>
> O ┃  ┃Juanma Barranquero     ┃ ╰──❯   <Jul 21 2013 14:58>               ;; Y
>
> I hoped that `gnus-thread-sort-functions' was applied only to thread
> roots, and `gnus-sort-gathered-threads-function' to subthreads, but that
> doesn't seem to be tha case.

Huh, interesting -- I hadn't realized subthreads were sorted as well,
but they are: gnus-sort-threads calls the appropriately-named
gnus-sort-threads-recursive.

That's hard-coded, and there's nothing to distinguish a top-level thread
from a subthread. But I'll bet with a little care, it would be possible
to make a gnus-sort-threads-recursively-p option, which would have
gnus-sort-threads break to gnus-sort-articles after the first round of
sorting... Maybe.

Eric




reply via email to

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