Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* gnus-thread-sort-functions
@ 2009-05-07  7:59 Sébastien Vauban
  2009-05-07 12:13 ` gnus-thread-sort-functions Tassilo Horn
       [not found] ` <mailman.6797.1241698429.31690.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 7+ messages in thread
From: Sébastien Vauban @ 2009-05-07  7:59 UTC (permalink / raw)
  To: info-gnus-english-mXXj517/zsQ

Hello,

I would like to have a "chronological" (but threaded) view of the mails I
read, that is:

    o   threads sorted by date (with the most recent at the bottom of the
        screen);

    o   articles in threads sorted by date (and reference -- of course):

--8<---------------cut here---------------start------------->8---
                                ...43  3.3k     ● [STUMP] run-or-raise firefox
    David Hansen     2006-11-26 05:05  4.3k     └─▶
    Jay Belanger     2006-11-26 22:26  4.0k       ├─▶
    Jeremy Hankins   2006-11-27 00:15  5.3k       │└─▶
    Jay Belanger     2006-11-27 01:01  3.5k       │  └─▶
  + Shawn Betts      2006-11-27 04:22  3.8k       │    └─▶
    Jay Belanger     2006-11-27 01:25  3.7k       │      └─▶
  + Shawn Betts      2006-11-27 03:11  3.7k       └─▶
--8<---------------cut here---------------end--------------->8---

Though, playing with `gnus-thread-sort-functions' seems to achieve one but the
opposite of the other: with my current setup ...

--8<---------------cut here---------------start------------->8---
gnus-thread-sort-functions is a variable defined in `gnus-sum.el'.
Its value is
    (gnus-thread-sort-by-number
     gnus-thread-sort-by-most-recent-date)
--8<---------------cut here---------------end--------------->8---

... the sorting inside a thread is correct, but thread roots are sorted in the
anti-chronological view.

Is there a way to set up both independently?

Best regards,
  Seb

-- 
Seb

Sébastien Vauban

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus-thread-sort-functions
  2009-05-07  7:59 gnus-thread-sort-functions Sébastien Vauban
@ 2009-05-07 12:13 ` Tassilo Horn
       [not found] ` <mailman.6797.1241698429.31690.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2009-05-07 12:13 UTC (permalink / raw)
  To: info-gnus-english

Sébastien Vauban <zthjwsqqafhv@spammotel.com>
writes:

Hi Sébastien,

> I would like to have a "chronological" (but threaded) view of the mails I
> read, that is:
>
>     o   threads sorted by date (with the most recent at the bottom of the
>         screen);
>
>     o   articles in threads sorted by date (and reference -- of course):
>
>                                 ...43  3.3k     ● [STUMP] run-or-raise firefox
>     David Hansen     2006-11-26 05:05  4.3k     └─▶
>     Jay Belanger     2006-11-26 22:26  4.0k       ├─▶
>     Jeremy Hankins   2006-11-27 00:15  5.3k       │└─▶
>     Jay Belanger     2006-11-27 01:01  3.5k       │  └─▶
>   + Shawn Betts      2006-11-27 04:22  3.8k       │    └─▶
>     Jay Belanger     2006-11-27 01:25  3.7k       │      └─▶
>   + Shawn Betts      2006-11-27 03:11  3.7k       └─▶
>
> Though, playing with `gnus-thread-sort-functions' seems to achieve one but the
> opposite of the other: with my current setup ...
>
> gnus-thread-sort-functions is a variable defined in `gnus-sum.el'.
> Its value is
>     (gnus-thread-sort-by-number
>      gnus-thread-sort-by-most-recent-date)
>
> ... the sorting inside a thread is correct, but thread roots are sorted in the
> anti-chronological view.
>
> Is there a way to set up both independently?

Yes, you have to invert the predicate.  Here's what I use:

--8<---------------cut here---------------start------------->8---
(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
        (not gnus-thread-sort-by-most-recent-date)
        gnus-thread-sort-by-total-score))
--8<---------------cut here---------------end--------------->8---

With this setup I get this behavior:

  - Threads with higher score appear on top of the summary
  - Threads with equal score appear sorted by date, e.g.
    newer threads are below older ones
  - Inside threads newer articles come before older ones

Bye,
Tassilo
-- 
          "Emacs is not a development tool but a way of life."
                - David Kastrup in alt.religion.emacs -

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus-thread-sort-functions
       [not found] ` <mailman.6797.1241698429.31690.info-gnus-english@gnu.org>
@ 2009-05-07 13:33   ` Richard Riley
  2009-05-07 19:51     ` gnus-thread-sort-functions Tassilo Horn
  2009-05-08 12:41   ` gnus-thread-sort-functions Sébastien Vauban
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Riley @ 2009-05-07 13:33 UTC (permalink / raw)
  To: info-gnus-english

Tassilo Horn <tassilo@member.fsf.org> writes:

> Sébastien Vauban <zthjwsqqafhv@spammotel.com>
> writes:
>
> Hi Sébastien,
>
>> I would like to have a "chronological" (but threaded) view of the mails I
>> read, that is:
>>
>>     o   threads sorted by date (with the most recent at the bottom of the
>>         screen);
>>
>>     o   articles in threads sorted by date (and reference -- of course):
>>
>>                                 ...43  3.3k     ● [STUMP] run-or-raise firefox
>>     David Hansen     2006-11-26 05:05  4.3k     └─▶
>>     Jay Belanger     2006-11-26 22:26  4.0k       ├─▶
>>     Jeremy Hankins   2006-11-27 00:15  5.3k       │└─▶
>>     Jay Belanger     2006-11-27 01:01  3.5k       │  └─▶
>>   + Shawn Betts      2006-11-27 04:22  3.8k       │    └─▶
>>     Jay Belanger     2006-11-27 01:25  3.7k       │      └─▶
>>   + Shawn Betts      2006-11-27 03:11  3.7k       └─▶
>>
>> Though, playing with `gnus-thread-sort-functions' seems to achieve one but the
>> opposite of the other: with my current setup ...
>>
>> gnus-thread-sort-functions is a variable defined in `gnus-sum.el'.
>> Its value is
>>     (gnus-thread-sort-by-number
>>      gnus-thread-sort-by-most-recent-date)
>>
>> ... the sorting inside a thread is correct, but thread roots are sorted in the
>> anti-chronological view.
>>
>> Is there a way to set up both independently?
>
> Yes, you have to invert the predicate.  Here's what I use:
>
>
>
> (setq gnus-thread-sort-functions
>       '(gnus-thread-sort-by-number
>         (not gnus-thread-sort-by-most-recent-date)
>         gnus-thread-sort-by-total-score))
>
>
>
> With this setup I get this behavior:
>
>   - Threads with higher score appear on top of the summary
>   - Threads with equal score appear sorted by date, e.g.
>     newer threads are below older ones
>   - Inside threads newer articles come before older ones
>
> Bye,
> Tassilo

Just for anyone googling thread sorts, mine is

       (setq gnus-thread-sort-functions
       '(gnus-thread-sort-by-number
	 (lambda (t1 t2) (not (gnus-thread-sort-by-date t1 t2)))))


Which has my preferred format of newer emails/posts at the top and
threads by date. 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus-thread-sort-functions
  2009-05-07 13:33   ` gnus-thread-sort-functions Richard Riley
@ 2009-05-07 19:51     ` Tassilo Horn
  0 siblings, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2009-05-07 19:51 UTC (permalink / raw)
  To: info-gnus-english

Richard Riley <rileyrgdev@googlemail.com> writes:

hi Richard,

> Just for anyone googling thread sorts, mine is
>
>        (setq gnus-thread-sort-functions
>        '(gnus-thread-sort-by-number
> 	 (lambda (t1 t2) (not (gnus-thread-sort-by-date t1 t2)))))

Oh, that's the long form of

--8<---------------cut here---------------start------------->8---
(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
        (lambda (t1 t2) (gnus-thread-sort-by-date t2 t1))))
--8<---------------cut here---------------end--------------->8---

right? ;-)

And it's equivalent to

--8<---------------cut here---------------start------------->8---
(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-number
        (not gnus-thread-sort-by-date)))
--8<---------------cut here---------------end--------------->8---

Bye,
Tassilo
-- 
VI VI VI - The Roman Number Of The Beast

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus-thread-sort-functions
       [not found] ` <mailman.6797.1241698429.31690.info-gnus-english@gnu.org>
  2009-05-07 13:33   ` gnus-thread-sort-functions Richard Riley
@ 2009-05-08 12:41   ` Sébastien Vauban
  2009-05-08 15:29     ` gnus-thread-sort-functions Tassilo Horn
       [not found]     ` <mailman.6851.1241796615.31690.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 7+ messages in thread
From: Sébastien Vauban @ 2009-05-08 12:41 UTC (permalink / raw)
  To: info-gnus-english-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> Sébastien Vauban writes:
>> I would like to have a "chronological" (but threaded) view of the mails I
>> read, that is:
>>
>>     o   threads sorted by date (with the most recent at the bottom of the
>>         screen);
>>
>>     o   articles in threads sorted by date (and reference -- of course):
>
> You have to invert the predicate.  Here's what I use:
>
> (setq gnus-thread-sort-functions
>       '(gnus-thread-sort-by-number
>         (not gnus-thread-sort-by-most-recent-date)
>         gnus-thread-sort-by-total-score))

Thanks!  This works, indeed. I just don't add your last line about score, as
I'm not interested in a custom sorting based on score.

Though,

1. "False" threads seem not to be correctly displayed based on the above rule.
   By false threads, I mean articles bound together based on the subject, not
   on the reference.

   Such threads do not appear to be correctly sorted based on the most recent
   date, but only on the root date. Do you have a similar effect?

2. I've seen a few threads where the internal sorting was crazy, such as:

--8<---------------cut here---------------start------------->8---
     poster2          2007-07-24 06:44  4.1k     ● (First answer)
     poster3          2007-07-24 19:42  0.0k     ├─▶ (Second answer)
     poster4          2007-07-24 19:42  4.6k     │└─▶ (Third answer)
     poster5          2007-07-28 03:13  5.2k     │   └─▶ (Fourth answer)
     original-poster  2007-07-24 08:28  5.8k     └─▶ (Question)
--8<---------------cut here---------------end--------------->8---

   I can't find back an example of this, but...

3. Have you any specific customization for the threading stuff?

   I just had:

--8<---------------cut here---------------start------------->8---
     (setq gnus-fetch-old-headers nil)  ; nil to speed up

     (setq gnus-build-sparse-threads 'some)
--8<---------------cut here---------------end--------------->8---

   but will now adapt those to:

--8<---------------cut here---------------start------------->8---
     (setq gnus-fetch-old-headers 'some)

     (setq gnus-build-sparse-threads 'more)
--8<---------------cut here---------------end--------------->8---

Thanks for having answered already!

Seb

-- 
Sébastien Vauban

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus-thread-sort-functions
  2009-05-08 12:41   ` gnus-thread-sort-functions Sébastien Vauban
@ 2009-05-08 15:29     ` Tassilo Horn
       [not found]     ` <mailman.6851.1241796615.31690.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 7+ messages in thread
From: Tassilo Horn @ 2009-05-08 15:29 UTC (permalink / raw)
  To: info-gnus-english

Sébastien Vauban <zthjwsqqafhv@spammotel.com>
writes:

Hi Sébastien,

> 1. "False" threads seem not to be correctly displayed based on the
>    above rule.  By false threads, I mean articles bound together based on
>    the subject, not on the reference.
>
>    Such threads do not appear to be correctly sorted based on the most
>    recent date, but only on the root date. Do you have a similar
>    effect?

I have to admit that I never compared dates.  I even don't show them in
summary buffers...

> 2. I've seen a few threads where the internal sorting was crazy, such as:
>
>      poster2          2007-07-24 06:44  4.1k     ● (First answer)
>      poster3          2007-07-24 19:42  0.0k     ├─▶ (Second answer)
>      poster4          2007-07-24 19:42  4.6k     │└─▶ (Third answer)
>      poster5          2007-07-28 03:13  5.2k     │   └─▶ (Fourth answer)
>      original-poster  2007-07-24 08:28  5.8k     └─▶ (Question)
>
>    I can't find back an example of this, but...

Phew, dunno how this could happen.  Maybe somehow by setting
gnus-summary-thread-gathering-function to gnus-gather-threads-by-subject
and posters with wrong dates?  But that's only a blind guess...

> 3. Have you any specific customization for the threading stuff?

I use

      (setq gnus-fetch-old-headers 'some)
      (setq gnus-build-sparse-threads nil) ;; the default

and never tried other values of the latter.

Bye,
Tassilo

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: gnus-thread-sort-functions
       [not found]     ` <mailman.6851.1241796615.31690.info-gnus-english@gnu.org>
@ 2009-06-05 11:52       ` Sébastien Vauban
  0 siblings, 0 replies; 7+ messages in thread
From: Sébastien Vauban @ 2009-06-05 11:52 UTC (permalink / raw)
  To: info-gnus-english-mXXj517/zsQ

Hi Tassilo,

Tassilo Horn wrote:
> Sébastien Vauban writes:
>>    "False" threads seem not to be correctly displayed based on the
>>    above rule.  By false threads, I mean articles bound together based on
>>    the subject, not on the reference.
>>
>>    Such threads do not appear to be correctly sorted based on the most
>>    recent date, but only on the root date. Do you have a similar
>>    effect?
>
> I have to admit that I never compared dates.  I even don't show them in
> summary buffers...

I do, as you can see in the example below.

After having used the following settings for a while...

--8<---------------cut here---------------start------------->8---
;; don't grab old headers to build threads
(setq gnus-fetch-old-headers nil)  ; nil to speed up (otherwise, it can
                                   ; seriously impact performance)

;; only fill in the gaps that are needed to tie loose threads together
(setq gnus-build-sparse-threads 'some)
--8<---------------cut here---------------end--------------->8---


... I can tell the sorting works quite well...

... except:

A. for "false threads" (as previously said, see above)

B. and that...
>> I've seen a few threads where the internal sorting was crazy, such as:
>>
>>      poster2          2007-07-24 06:44  4.1k     o (First answer)
>>      poster3          2007-07-24 19:42  0.0k     |-> (Second answer)
>>      poster4          2007-07-24 19:42  4.6k     ||-> (Third answer)
>>      poster5          2007-07-28 03:13  5.2k     |   |-> (Fourth answer)
>>      original-poster  2007-07-24 08:28  5.8k     |-> (Question)
>>
>>    I can't find back an example of this, but...
>
> Phew, dunno how this could happen.

Here is a real-life example (YES!!), just found when reading the Emacs
newsgroup (with some noticeable delay...umh..umh):

--8<---------------cut here---------------start------------->8---
Q                    1970-01-01 01:00  0.0k     o Re: pretty-layout in html-mode
R   ken              2009-05-12 11:58  2.7k       |->
Q                    2009-05-12 11:59  0.0k       |->
R   Chris Withers    2009-05-12 11:59  2.5k         |->
R   Anselm Helbig    2009-05-12 12:02  2.1k         ||->
Q                    2009-05-12 13:03  0.0k         |->
R   tomas@tuxteam.d  2009-05-12 13:03  2.6k           |->
Q                    2009-05-12 12:57  0.0k           |->
Q                    2009-05-12 13:14  0.0k             |->
R   tomas@tuxteam.d  2009-05-12 13:14  2.7k             ||->
R   Chris Withers    2009-05-12 12:57  2.3k             |->
R   B. T. Raven      2009-05-12 16:58  2.3k               |->
R   Chris Withers    2009-05-12 11:28  1.8k                 |->
--8<---------------cut here---------------end--------------->8---

In fact, the original question (from Chris Withers) is the last line that of
this thread... Such a phenomenon rarely happens, but it does.

Some others answers are displayed before the questions...


> Maybe somehow by setting gnus-summary-thread-gathering-function to
> gnus-gather-threads-by-subject and posters with wrong dates? But that's only
> a blind guess...

Here is my value for `gnus-summary-thread-gathering-function':

    ,----
    | gnus-summary-thread-gathering-function is a variable defined in `gnus-sum.el'.
    | Its value is
    | gnus-gather-threads-by-subject
    |
    | Documentation:
    | *Function used for gathering loose threads.
    | There are two pre-defined functions: `gnus-gather-threads-by-subject',
    | which only takes Subjects into consideration; and
    | `gnus-gather-threads-by-references', which compared the References
    | headers of the articles to find matches.
    `----

I never played with it... It's the default value.

Do yo have the similar problem when you read the above thread from the Emacs
newsgroup?

Best regards!
  Seb

--
Sébastien Vauban

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-05 11:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-07  7:59 gnus-thread-sort-functions Sébastien Vauban
2009-05-07 12:13 ` gnus-thread-sort-functions Tassilo Horn
     [not found] ` <mailman.6797.1241698429.31690.info-gnus-english@gnu.org>
2009-05-07 13:33   ` gnus-thread-sort-functions Richard Riley
2009-05-07 19:51     ` gnus-thread-sort-functions Tassilo Horn
2009-05-08 12:41   ` gnus-thread-sort-functions Sébastien Vauban
2009-05-08 15:29     ` gnus-thread-sort-functions Tassilo Horn
     [not found]     ` <mailman.6851.1241796615.31690.info-gnus-english@gnu.org>
2009-06-05 11:52       ` gnus-thread-sort-functions Sébastien Vauban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).