Gnus development mailing list
 help / color / mirror / Atom feed
* different thread sorting?
@ 1998-11-02 16:19 Kai.Grossjohann
  1998-11-07 14:10 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Kai.Grossjohann @ 1998-11-02 16:19 UTC (permalink / raw)


There was a thread some time ago about different sorting of threads.

Current behavior:
Thread A is sorted before thread B if the OLDEST article in A is older
than the OLDEST article in B.

Desired behavior:
Thread A is sorted before thread B if the NEWEST article in A is older
than the NEWEST article in B.

Of course, this behavior should be optional.

What has become of this issue? 

kai
-- 
Life is hard and then you die.


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

* Re: different thread sorting?
  1998-11-02 16:19 different thread sorting? Kai.Grossjohann
@ 1998-11-07 14:10 ` Lars Magne Ingebrigtsen
  1998-11-09 16:38   ` Wes Hardaker
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-07 14:10 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE writes:

> Current behavior:
> Thread A is sorted before thread B if the OLDEST article in A is older
> than the OLDEST article in B.

That's almost right -- the threads are sorted on the thread root.
This is the oldest article in most cases, but in some weird cases,
it's not.

> Desired behavior:
> Thread A is sorted before thread B if the NEWEST article in A is older
> than the NEWEST article in B.
> 
> Of course, this behavior should be optional.
> 
> What has become of this issue? 

I haven't done anything about it.  Implementing it shouldn't be too
difficult, I think -- one should write a function that descends the
thread tree and returns the header of the newest article, and then just
sort the threads using a function that would look like:

(defun gnus-thread-sort-by-newest-date (h1 h2)
  "Sort threads by root article date."
  (gnus-article-sort-by-date
   (gnus-newest-article-in-thread h1) (gnus-newest-article-in-thread h2)))

Writing `gnus-newest-article-in-thread' is left as an exercise for the
reader. 

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: different thread sorting?
  1998-11-07 14:10 ` Lars Magne Ingebrigtsen
@ 1998-11-09 16:38   ` Wes Hardaker
  1998-11-10  4:51     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Wes Hardaker @ 1998-11-09 16:38 UTC (permalink / raw)


>>>>> On 07 Nov 1998 15:10:34 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

Lars> (defun gnus-thread-sort-by-newest-date (h1 h2)
Lars> "Sort threads by root article date."
Lars> (gnus-article-sort-by-date
Lars> (gnus-newest-article-in-thread h1) (gnus-newest-article-in-thread h2)))

But it would be so much cooler to say:

(setq gnus-thread-sort-functions
      '((reverse gnus-thread-sort-by-number)       ;; sorts new article first
	gnus-thread-sort-by-subject
	(reverse gnus-thread-sort-by-total-score)  ;; sorts low score first
	gnus-thread-sort-by-tick))

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


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

* Re: different thread sorting?
  1998-11-09 16:38   ` Wes Hardaker
@ 1998-11-10  4:51     ` Lars Magne Ingebrigtsen
  1998-11-10 17:25       ` Wes Hardaker
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-10  4:51 UTC (permalink / raw)


Wes Hardaker <wjhardaker@ucdavis.edu> writes:

> Lars> (defun gnus-thread-sort-by-newest-date (h1 h2)
> Lars> "Sort threads by root article date."
> Lars> (gnus-article-sort-by-date
> Lars> (gnus-newest-article-in-thread h1) (gnus-newest-article-in-thread h2)))
> 
> But it would be so much cooler to say:
> 
> (setq gnus-thread-sort-functions
>       '((reverse gnus-thread-sort-by-number)       ;; sorts new article first

But that's not the same -- that will sort so that the thread with the
newest root is first; not the thread that contains the newest article.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: different thread sorting?
  1998-11-10  4:51     ` Lars Magne Ingebrigtsen
@ 1998-11-10 17:25       ` Wes Hardaker
  1998-11-13 18:08         ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 7+ messages in thread
From: Wes Hardaker @ 1998-11-10 17:25 UTC (permalink / raw)


>>>>> On 10 Nov 1998 05:51:11 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

>> (setq gnus-thread-sort-functions
>> '((reverse gnus-thread-sort-by-number)       ;; sorts new article first

Lars> But that's not the same -- that will sort so that the thread
Lars> with the newest root is first; not the thread that contains the
Lars> newest article.

Point being, that it would be cooler to have a structure like this and 
simply stick the new sort function (doing the type of sort you're
looking for) with a "reverse" tag associated with it to get it to
reverse the arguments of the sort...

-- 
"Ninjas aren't dangerous.  They're more afraid of you than you are of them."


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

* Re: different thread sorting?
  1998-11-10 17:25       ` Wes Hardaker
@ 1998-11-13 18:08         ` Lars Magne Ingebrigtsen
  1998-11-13 18:43           ` Wes Hardaker
  0 siblings, 1 reply; 7+ messages in thread
From: Lars Magne Ingebrigtsen @ 1998-11-13 18:08 UTC (permalink / raw)


Wes Hardaker <wjhardaker@ucdavis.edu> writes:

> Point being, that it would be cooler to have a structure like this and 
> simply stick the new sort function (doing the type of sort you're
> looking for) with a "reverse" tag associated with it to get it to
> reverse the arguments of the sort...

That's a nice idea.  I've added it to 0.43.

But since these really are predicates and not functions that sort, I
don't think `reverse' is the right thing.  So I made it `inverse'.

Er.  That's not right either.  Isn't `not' the thing?  Yes.  I'll make
it `not'.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


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

* Re: different thread sorting?
  1998-11-13 18:08         ` Lars Magne Ingebrigtsen
@ 1998-11-13 18:43           ` Wes Hardaker
  0 siblings, 0 replies; 7+ messages in thread
From: Wes Hardaker @ 1998-11-13 18:43 UTC (permalink / raw)


>>>>> On 13 Nov 1998 19:08:21 +0100, Lars Magne Ingebrigtsen <larsi@gnus.org> said:

>> Point being, that it would be cooler to have a structure like this and 
>> simply stick the new sort function (doing the type of sort you're
>> looking for) with a "reverse" tag associated with it to get it to
>> reverse the arguments of the sort...

Lars> That's a nice idea.  I've added it to 0.43.

...

Lars> Er.  That's not right either.  Isn't `not' the thing?  Yes.
Lars> I'll make it `not'.

Sounds good to me!



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

end of thread, other threads:[~1998-11-13 18:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-02 16:19 different thread sorting? Kai.Grossjohann
1998-11-07 14:10 ` Lars Magne Ingebrigtsen
1998-11-09 16:38   ` Wes Hardaker
1998-11-10  4:51     ` Lars Magne Ingebrigtsen
1998-11-10 17:25       ` Wes Hardaker
1998-11-13 18:08         ` Lars Magne Ingebrigtsen
1998-11-13 18:43           ` Wes Hardaker

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).