Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Simple thread sorting question
@ 2007-01-11 17:49 Jarmo Hurri
  2007-01-11 21:06 ` Reiner Steib
  0 siblings, 1 reply; 9+ messages in thread
From: Jarmo Hurri @ 2007-01-11 17:49 UTC (permalink / raw)



Hello all,

I am trying to sort my summary buffers so that those threads which
have the most recent posts (or mails) are last. However, I am getting
a headache when I try to do this.

The following definition in my .gnus-file puts those threads which
have the most recent posts *first* in the summary buffer (for
simplicity, I have left out the default gnus-thread-sort-by-number out
of the list, but including it makes no difference):

(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-most-recent-number))

therefore, following the manual, I understood that the following would
result in a reverse order, the order which I would like to have

(setq gnus-thread-sort-functions
      '((not gnus-thread-sort-by-most-recent-number)))

However, this does not happen: in the latter case, the threads seem to
be sorted by the default (number-based) ordering.

I am using Gnus v5.10.8 in XEmacs 21.4 (patch 19).

-- 
Jarmo Hurri

Commercial email countermeasures included in header email
address. Remove all garbage from header email address when replying,
or just use firstname.lastname@cs.helsinki.fi .

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

* Re: Simple thread sorting question
  2007-01-11 17:49 Simple thread sorting question Jarmo Hurri
@ 2007-01-11 21:06 ` Reiner Steib
  2007-01-12  7:10   ` Jarmo Hurri
  0 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2007-01-11 21:06 UTC (permalink / raw)


On Thu, Jan 11 2007, Jarmo Hurri wrote:

> (setq gnus-thread-sort-functions
>       '((not gnus-thread-sort-by-most-recent-number)))
>
> However, this does not happen: in the latter case, the threads seem to
> be sorted by the default (number-based) ordering.

Works for me.  Do you really have threading turned on?  See
`gnus-show-threads' and...

,----[ (info "(gnus)Sorting the Summary Buffer") ]
|    If you are using an unthreaded display for some strange reason or
| other, you have to fiddle with the `gnus-article-sort-functions'
| variable.
`----

> I am using Gnus v5.10.8 in XEmacs 21.4 (patch 19).

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: Simple thread sorting question
  2007-01-11 21:06 ` Reiner Steib
@ 2007-01-12  7:10   ` Jarmo Hurri
  2007-01-12 10:43     ` Reiner Steib
  0 siblings, 1 reply; 9+ messages in thread
From: Jarmo Hurri @ 2007-01-12  7:10 UTC (permalink / raw)



>> (setq gnus-thread-sort-functions
>> '((not gnus-thread-sort-by-most-recent-number)))
>> 
>> However, this does not happen: in the latter case, the threads seem
>> to be sorted by the default (number-based) ordering.

Reiner> Works for me.  

Really?! Great... Sounds like some weirder configuration problem?

Reiner> Do you really have threading turned on?  See
Reiner> `gnus-show-threads' and...

The value of gnus-show-threads is t. Also, as I mentioned in my
original post, sorting the threads works in the non-reverse case for
gnus-thread-sort-by-most-recent-number, which suggests that threading
is working ok.

Any ideas on how to approach this?

-- 
Jarmo Hurri

Commercial email countermeasures included in header email
address. Remove all garbage from header email address when replying,
or just use firstname.lastname@cs.helsinki.fi .

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

* Re: Simple thread sorting question
  2007-01-12  7:10   ` Jarmo Hurri
@ 2007-01-12 10:43     ` Reiner Steib
  2007-01-12 14:17       ` Jarmo Hurri
  0 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2007-01-12 10:43 UTC (permalink / raw)


On Fri, Jan 12 2007, Jarmo Hurri wrote:

>>> (setq gnus-thread-sort-functions
>>> '((not gnus-thread-sort-by-most-recent-number)))
>>> 
>>> However, this does not happen: in the latter case, the threads seem
>>> to be sorted by the default (number-based) ordering.
>
> Reiner> Works for me.  

I tried again.  With both Gnus 5.11 and current No Gnus (CVS, trunk),
the threads are sorted ascending (WRT the most recent number of a
posting in each thread).  I checked the article numbers in summary
buffer mode line.  But you may prepend `gnus-summary-line-format' with
"%N" for debugging.

,----
| ELISP> gnus-summary-line-format
| "%N %U%R%z%I%(%[%4L: %-23,23f%]%) %s\n"
| ELISP> gnus-thread-sort-functions
| ((not gnus-thread-sort-by-most-recent-number))
| 
| ELISP> gnus-version
| "Gnus v5.11"
`----

This is what I get with this (minimal .emacs / .gnus.el files):

,----
| 1538    [  45: Glyn Millington        ] Can't send mail with Em
| 1550        [  32: Glyn Millington        ] 
| 1551        [  57: Reiner Steib           ] 
| 1553    [  10: Bastien                ] gnus-topic-line-format 
| 1558    [  27: Leo                    ] Re: A few questions on 
| 1560        [  12: Daiki Ueno             ] 
| 1561            [  31: Leo                    ] 
| 1562                [  27: Daiki Ueno             ] 
| 1564    [  32: Jarmo Hurri            ] Simple thread sorting q
| 1565        [  24: Reiner Steib           ] 
| 1557    [  38: Slackrat               ] Gnus Gurus? X-Guarantee
| 1566        [  25: Reiner Steib           ] 
| 1567    [  10: Hadron Quark           ] w3m-search
| 1568        [  16: Katsumi Yamaoka        ] 
| 1569    [   8: Hadron Quark           ] customizing w3m-weather
`----

Gnus 5.11 is very similar to your Gnus 5.10.8 (is it the release or
from the v5-10 CVS branch?).  The only major difference is the you use
XEmacs.  But I hope that we don't have an incompatibility in sorting
here.

> Really?! Great... Sounds like some weirder configuration problem?

Please re-check the value of `gnus-thread-sort-functions' in the
summary buffer.

> Reiner> Do you really have threading turned on?  See
> Reiner> `gnus-show-threads' and...
>
> The value of gnus-show-threads is t. Also, as I mentioned in my
> original post, sorting the threads works in the non-reverse case for
> gnus-thread-sort-by-most-recent-number, which suggests that threading
> is working ok.
>
> Any ideas on how to approach this?

Try to reproduce it with a minimal configuration. See
<http://mid.gmane.org/v9d564kp8q.fsf%40marauder.physik.uni-ulm.de> ...

-----------------
»» Could you try to reproduce with a minimal Gnus setup and/or check
»» for any relevant customizations?
»
» Hm... how do I create a minimal Gnus setup, without messing up my
» current setup?  Create a different user account?

That's option 1.  Option 2 is to create a new home directory for this
Emacs session:

--8<---------------cut here---------------start------------->8---
emacs_test=~/path/to/my/emacs_test
mkdir -p $emacs_test
cd $emacs_test
ln -s ~/.Xauthority .
HOME=$PWD emacs &
--8<---------------cut here---------------end--------------->8---

The .emacs and .gnus.el files in $emacs_test should only contain
minimal settings (e.g. `load-path' for Gnus, `gnus-select-method').

Option 3 is to set `gnus-home-directory' to the value of $emacs_test
within Emacs before loading ~/.gnus.el or maybe better start from
"emacs -q".
-----------------

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: Simple thread sorting question
  2007-01-12 10:43     ` Reiner Steib
@ 2007-01-12 14:17       ` Jarmo Hurri
  2007-01-12 17:05         ` Reiner Steib
  0 siblings, 1 reply; 9+ messages in thread
From: Jarmo Hurri @ 2007-01-12 14:17 UTC (permalink / raw)



Reiner> I tried again.  ... the threads are sorted ascending (WRT the
Reiner> most recent number of a posting in each thread).  ... But you
Reiner> may prepend `gnus-summary-line-format' with "%N" for
Reiner> debugging.

Yes, your threads seem to be in correct order.  I tried this and the
last lines of my mail threads look like this:

3953  A [  82: Johannes Schmidt       ] Re: CNS - project work available
3964        <  76: Johannes Schmidt       > 
3963    [  17: Harri Valpola          ] Re: Cortical maps
3965  A [  30: Harri Valpola          ] Re: Tulokset
3972        [   4: -> Jarmo Hurri         ] 

As far as I have understood, the first and second thread should be in
reverse order, right? And my ordering seems to follow the number of
the first mail in the thread.

The values of my variables are

`gnus-show-threads'
Value: t
`gnus-thread-sort-functions'
Value: ((not gnus-thread-sort-by-most-recent-number))
`gnus-version'
Value: "Gnus v5.10.8"

If I use the non-reversed sorting, that is, if I set the variable

`gnus-thread-sort-functions'
Value: (gnus-thread-sort-by-most-recent-number)

then the top of the buffer looks like this

3965  A [  30: Harri Valpola          ] Re: Tulokset
3972        [   4: -> Jarmo Hurri         ] 
3953  A [  82: Johannes Schmidt       ] Re: CNS - project work available
3964        <  76: Johannes Schmidt       > 
3963    [  17: Harri Valpola          ] Re: Cortical maps

so now the ordering is correct

Reiner> Try to reproduce it with a minimal configuration.

I will do this at some point. It might be some weird configuration
somewhere (I have inherited a few XEmacs settings...), but if this is
the case then something might be at least missing from the manual.

BTW, how do you get the following neat elisp evaluation buffer
started:

Reiner> | ELISP> gnus-summary-line-format

-- 
Jarmo Hurri

Commercial email countermeasures included in header email
address. Remove all garbage from header email address when replying,
or just use firstname.lastname@cs.helsinki.fi .

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

* Re: Simple thread sorting question
  2007-01-12 14:17       ` Jarmo Hurri
@ 2007-01-12 17:05         ` Reiner Steib
  2007-01-13 10:37           ` Jarmo Hurri
  0 siblings, 1 reply; 9+ messages in thread
From: Reiner Steib @ 2007-01-12 17:05 UTC (permalink / raw)


On Fri, Jan 12 2007, Jarmo Hurri wrote:

> 3953  A [  82: Johannes Schmidt       ] Re: CNS - project work available
> 3964        <  76: Johannes Schmidt       > 
> 3963    [  17: Harri Valpola          ] Re: Cortical maps
> 3965  A [  30: Harri Valpola          ] Re: Tulokset
> 3972        [   4: -> Jarmo Hurri         ] 
>
> As far as I have understood, the first and second thread should be in
> reverse order, right? And my ordering seems to follow the number of
> the first mail in the thread.

"< ... >" instead of "[ ... ]" indicates a loose thread.  Maybe this
is the problem.

,----[ (info "(gnus)Loose Threads") ]
|     `adopt'
|           Gnus will make the first of the orphaned articles the parent.
|           This parent will adopt all the other articles.  The adopted
|           articles will be marked as such by pointy brackets (`<>')
|           instead of the standard square brackets (`[]').  This is the
|           default method.
`----

Does it work as expected e.g. in a Usenet group or in this group?

> BTW, how do you get the following neat elisp evaluation buffer
> started:
>
> Reiner> | ELISP> gnus-summary-line-format

M-x ielm RET

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: Simple thread sorting question
  2007-01-12 17:05         ` Reiner Steib
@ 2007-01-13 10:37           ` Jarmo Hurri
  2007-01-13 12:13             ` orphaned articles / loose threads and gnus-thread-sort-by-most-recent-number (was: Simple thread sorting question) Reiner Steib
       [not found]             ` <mailman.3033.1168717393.2155.info-gnus-english@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Jarmo Hurri @ 2007-01-13 10:37 UTC (permalink / raw)



Reiner> Does it work as expected e.g. in a Usenet group or in this group?

No, it does not seem to work as expected even in a Usenet group. Here
is the contents of my rec.outdoors.fishing.fly buffer with
gnus-thread-sort-by-most-recent-number, ordering correct as expected

439308    [  27: Larry and a Cat named D] Re: GFS2007 - Day 8 update
439309        [   8: rb608                  ] 
439291    [  17: Tim J.                 ] Re: Trout Unlimited
439307        <  12: Stan Gula              > 
439293    [  16: Tom Nakashima          ] Sportsman Fly Fishing Show
439306        [  17: Jonathan Cook          ] 
439305        [  22: BJ Conner              ] 
439303        [  22: Calif Bill             ] 
439296        [  31: briansfly              ] 
439298            [  45: Tom Nakashima          ] 
439301                [  13: Charlie Choc           ] 
439295    [  45: briansfly              ] Re: Floater help needed
439297        [  18: Larry L                ] 
439304            [  23: briansfly              ] 
439299    [   5: Scott Seidman          ] OT:  Olbermann
439300        [   9: Ken Fortenberry        ] 
439302            [  21: Scott Seidman          ] 
439292    [   9: salmobytes             ] Re: some good news anyway
439294        [  24: salmobytes             ] 
439290    [  28: Conan The Librarian    ] OT: A "creative" solution to
439289    [  47: James                  ] Re: Virus help, please

and here with (not gnus-thread-sort-by-most-recent-number), ordering
false: thread with post number 439307 is way too high

439289    [  47: James                  ] Re: Virus help, please
439290    [  28: Conan The Librarian    ] OT: A "creative" solution to
439291    [  17: Tim J.                 ] Re: Trout Unlimited
439307        <  12: Stan Gula              > 
439292    [   9: salmobytes             ] Re: some good news anyway
439294        [  24: salmobytes             ] 
439299    [   5: Scott Seidman          ] OT:  Olbermann
439300        [   9: Ken Fortenberry        ] 
439302            [  21: Scott Seidman          ] 
439295    [  45: briansfly              ] Re: Floater help needed
439297        [  18: Larry L                ] 
439304            [  23: briansfly              ] 
439293    [  16: Tom Nakashima          ] Sportsman Fly Fishing Show
439296        [  31: briansfly              ] 
439298            [  45: Tom Nakashima          ] 
439301                [  13: Charlie Choc           ] 
439303        [  22: Calif Bill             ] 
439305        [  22: BJ Conner              ] 
439306        [  17: Jonathan Cook          ] 
439308    [  27: Larry and a Cat named D] Re: GFS2007 - Day 8 update
439309        [   8: rb608                  ] 

-- 
Jarmo Hurri

Commercial email countermeasures included in header email
address. Remove all garbage from header email address when replying,
or just use firstname.lastname@cs.helsinki.fi .

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

* orphaned articles / loose threads and gnus-thread-sort-by-most-recent-number (was: Simple thread sorting question)
  2007-01-13 10:37           ` Jarmo Hurri
@ 2007-01-13 12:13             ` Reiner Steib
       [not found]             ` <mailman.3033.1168717393.2155.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Reiner Steib @ 2007-01-13 12:13 UTC (permalink / raw)
  Cc: ding, info-gnus-english

[ Shifting this to the development list (ding).  Readers of ding, see
  <http://thread.gmane.org/gmane.emacs.gnus.user/8508/focus=8521> for
  more. ]

On Sat, Jan 13 2007, Jarmo Hurri wrote:

> and here with (not gnus-thread-sort-by-most-recent-number), ordering
> false: thread with post number 439307 is way too high
>
> 439289    [  47: James                  ] Re: Virus help, please
> 439290    [  28: Conan The Librarian    ] OT: A "creative" solution to
> 439291    [  17: Tim J.                 ] Re: Trout Unlimited
> 439307        <  12: Stan Gula              > 
> 439292    [   9: salmobytes             ] Re: some good news anyway
> 439294        [  24: salmobytes             ] 
> 439299    [   5: Scott Seidman          ] OT:  Olbermann
> 439300        [   9: Ken Fortenberry        ] 
> 439302            [  21: Scott Seidman          ] 
> 439295    [  45: briansfly              ] Re: Floater help needed
> 439297        [  18: Larry L                ] 
> 439304            [  23: briansfly              ] 
[...]

Again, 439307 is part of a loose thread.  I don't know how orphaned
articles / loose threads are supposed to be handled with
`gnus-thread-sort-by-most-recent-number'.  Anyone?

(Maybe we should just document the current behavior if we can't handle
orphans better?)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/



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

* Re: orphaned articles / loose threads and gnus-thread-sort-by-most-recent-number
       [not found]             ` <mailman.3033.1168717393.2155.info-gnus-english@gnu.org>
@ 2007-01-15  8:15               ` Jarmo Hurri
  0 siblings, 0 replies; 9+ messages in thread
From: Jarmo Hurri @ 2007-01-15  8:15 UTC (permalink / raw)



Reiner> Again, 439307 is part of a loose thread.  

Yes, good point.

Reiner> I don't know how orphaned articles / loose threads are
Reiner> supposed to be handled with
Reiner> `gnus-thread-sort-by-most-recent-number'.  Anyone?  (Maybe we
Reiner> should just document the current behavior if we can't handle
Reiner> orphans better?)

Isn't it still weird that it works as expected without the 'not'
reversing specification? I mean, in that case even orphans seem to be
handled pretty much perfectly. Or?

BTW, with the idea that this might be related to orphans, can you now
reproduce the problem on your system, or should I still strive to see
what happens with minimal configuration? (I mean, this could still all
just be something about my configuration.)

-- 
Jarmo Hurri

Commercial email countermeasures included in header email
address. Remove all garbage from header email address when replying,
or just use firstname.lastname@cs.helsinki.fi .

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

end of thread, other threads:[~2007-01-15  8:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-11 17:49 Simple thread sorting question Jarmo Hurri
2007-01-11 21:06 ` Reiner Steib
2007-01-12  7:10   ` Jarmo Hurri
2007-01-12 10:43     ` Reiner Steib
2007-01-12 14:17       ` Jarmo Hurri
2007-01-12 17:05         ` Reiner Steib
2007-01-13 10:37           ` Jarmo Hurri
2007-01-13 12:13             ` orphaned articles / loose threads and gnus-thread-sort-by-most-recent-number (was: Simple thread sorting question) Reiner Steib
     [not found]             ` <mailman.3033.1168717393.2155.info-gnus-english@gnu.org>
2007-01-15  8:15               ` orphaned articles / loose threads and gnus-thread-sort-by-most-recent-number Jarmo Hurri

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