Announcements and discussions for Gnus, the GNU Emacs Usenet newsreader
 help / color / mirror / Atom feed
* Re: Threads sorting doesn't work?
       [not found] <mailman.12537.1414865122.1147.info-gnus-english@gnu.org>
@ 2014-11-02  1:48 ` Emanuel Berg
       [not found]   ` <m2h9yi43n3.fsf@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2014-11-02  1:48 UTC (permalink / raw)
  To: info-gnus-english

Andrey Lisin <andrey.lisin@gmail.com> writes:

> According to Gnus documentation threads should be
> sorted by the most recent date firstly. But what I
> see in summary buffer is the oldest threads go on
> top and the most recent go down. Am I doing
> something wrong?

Not what I can see. But the documentation also
includes this:

   Each function takes two threads and returns non-nil
   if the first thread should be sorted before the
   other. If you use more than one function, the
   primary sort function should be the last. You
   should probably always include
   `gnus-thread-sort-by-number' in the list of sorting
   functions -- preferably first. Also note that
   sorting by date is often much slower than sorting
   by number, and the sorting order is very similar.
   (Sorting by date means sorting by the time the
   message was sent, sorting by number means sorting
   by arrival time.)

So perhaps you could try that and see it it works?

-- 
underground experts united

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

* Re: Threads sorting doesn't work?
       [not found]   ` <m2h9yi43n3.fsf@gmail.com>
@ 2014-11-02  5:47     ` Emanuel Berg
  2014-11-02  6:30       ` Andrey Lisin
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2014-11-02  5:47 UTC (permalink / raw)
  To: info-gnus-english

Andrey Lisin <andrey.lisin@gmail.com> writes:

> You know, I've tried `gnus-thread-sort-by-number'
> option, but now it looks like none of the options I
> put in my config files (~/.gnus.el or
> ~/.emacs.d/init.el) are not taken any effects.
>
> I've tried to cut my options set to
>
> (setq gnus-thread-sort-functions
> (gnus-thread-sort-by-most-recent-date))
>
> and there was no any effect.
>
> After that I changed it to
>
> (setq gnus-thread-sort-functions '((not
> gnus-thread-sort-by-most-recent-number)))
>
> no effect as well.
>
> Is it possbile options I set in ~/.gnus.el are not
> applied for some reason?

Yes, that's possible :)

I don't know what init order of config files is at
work on your system - try to make minimal files that
only do (message "I'm read") to debug. Copy the
ordinary files out of action or comment-out the "real"
stuff temporarily.

PS. You sent me this as a private mail. I take it it
was meant for the list, so I reply there with your
message quoted in full. DS.

-- 
underground experts united

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

* Re: Threads sorting doesn't work?
  2014-11-02  5:47     ` Emanuel Berg
@ 2014-11-02  6:30       ` Andrey Lisin
  0 siblings, 0 replies; 9+ messages in thread
From: Andrey Lisin @ 2014-11-02  6:30 UTC (permalink / raw)
  To: info-gnus-english

> Copy the ordinary files out of action or comment-out the "real" stuff
> temporarily.

Ha! You were right. The issue was I've copied a code snippet related to
Gnus from web and didn't notice there it redefines
`gnus-thread-sort-functions' variable. I've commented out that code and
everything works now as expected. Thank you!

> PS. You sent me this as a private mail. I take it it
> was meant for the list, so I reply there with your
> message quoted in full. DS.

Sorry for that. I've played the wrong chord :)


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

* Re: Threads sorting doesn't work?
  2014-11-02 14:12     ` Emanuel Berg
@ 2014-11-02 14:41       ` Andrey Lisin
  0 siblings, 0 replies; 9+ messages in thread
From: Andrey Lisin @ 2014-11-02 14:41 UTC (permalink / raw)
  To: info-gnus-english

Thank you for the valuable advice, Emanuel!   


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

* Re: Threads sorting doesn't work?
       [not found]   ` <mailman.12574.1414911747.1147.info-gnus-english@gnu.org>
@ 2014-11-02 14:12     ` Emanuel Berg
  2014-11-02 14:41       ` Andrey Lisin
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2014-11-02 14:12 UTC (permalink / raw)
  To: info-gnus-english

Andrey Lisin <andrey.lisin@gmail.com> writes:

> My problem was variable `gnus-thread-sort-functions'
> redefinition existed in my init scripts.

I'm glad you found it.

This is a common situation. It doesn't even have to be
other people's code that gets you confused. When you
have enough of your own, it is enough.

I have all my config in .el files in a dir (with
subdirs), so if I experience that - say -
`gnus-article-prepare-hook' behaves strange, I run:

    $ grep -n gnus-article-prepare-hook **/*.el

Then I see in what files - and where (the -n option) -
that hook is defined. ('**/*' is a zsh feature to
recursively do dirs and subdirs; there is probably
something similar in bash.)

There are other ways to do that but it works.
 
-- 
underground experts united

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

* Re: Threads sorting doesn't work?
  2014-11-02  6:25 ` Brady Trainor
@ 2014-11-02  6:41   ` Andrey Lisin
       [not found]   ` <mailman.12574.1414911747.1147.info-gnus-english@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Andrey Lisin @ 2014-11-02  6:41 UTC (permalink / raw)
  To: Brady Trainor; +Cc: info-gnus-english

Hi Bradly,

thank you for the advice, I'll take it into account, but I've just solve
the issue. My problem was variable `gnus-thread-sort-functions'
redefinition existed in my init scripts.


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

* Re: Threads sorting doesn't work?
  2014-11-01 17:59 Andrey Lisin
  2014-11-02  0:12 ` Michael Heerdegen
@ 2014-11-02  6:25 ` Brady Trainor
  2014-11-02  6:41   ` Andrey Lisin
       [not found]   ` <mailman.12574.1414911747.1147.info-gnus-english@gnu.org>
  1 sibling, 2 replies; 9+ messages in thread
From: Brady Trainor @ 2014-11-02  6:25 UTC (permalink / raw)
  To: info-gnus-english

Andrey Lisin <andrey.lisin@gmail.com> writes:

> Hello everyone!
>
> I'm new to Gnus and faced with the first troubles with it. I have
>
> (setq gnus-thread-sort-functions
>       '(gnus-thread-sort-by-subject
>         (not gnus-thread-sort-by-total-score)
>         gnus-thread-sort-by-most-recent-date))
>
> According to Gnus documentation threads should be sorted by the most
> recent date firstly. But what I see in summary buffer is the oldest
> threads go on top and the most recent go down. Am I doing something
> wrong?
>
> Thank you.

I was maybe as new as you not too long ago, and ran into a similar problem. It was because I had inadvertently toggled threading off, and this "mode" needed to have sorting enabled as well, a la article-thread-sort-functions. 

Perhaps this would work:

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

HTH

--
Brady



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

* Re: Threads sorting doesn't work?
  2014-11-01 17:59 Andrey Lisin
@ 2014-11-02  0:12 ` Michael Heerdegen
  2014-11-02  6:25 ` Brady Trainor
  1 sibling, 0 replies; 9+ messages in thread
From: Michael Heerdegen @ 2014-11-02  0:12 UTC (permalink / raw)
  To: info-gnus-english

Andrey Lisin <andrey.lisin@gmail.com> writes:

> (setq gnus-thread-sort-functions
>       '(gnus-thread-sort-by-subject
>         (not gnus-thread-sort-by-total-score)
>         gnus-thread-sort-by-most-recent-date))
>
> According to Gnus documentation threads should be sorted by the most
> recent date firstly. But what I see in summary buffer is the oldest
> threads go on top and the most recent go down. Am I doing something
> wrong?

For me it seems to work as expected.

How do you evaluate your code?


Michael.



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

* Threads sorting doesn't work?
@ 2014-11-01 17:59 Andrey Lisin
  2014-11-02  0:12 ` Michael Heerdegen
  2014-11-02  6:25 ` Brady Trainor
  0 siblings, 2 replies; 9+ messages in thread
From: Andrey Lisin @ 2014-11-01 17:59 UTC (permalink / raw)
  To: info-gnus-english

Hello everyone!

I'm new to Gnus and faced with the first troubles with it. I have

(setq gnus-thread-sort-functions
      '(gnus-thread-sort-by-subject
        (not gnus-thread-sort-by-total-score)
        gnus-thread-sort-by-most-recent-date))

According to Gnus documentation threads should be sorted by the most
recent date firstly. But what I see in summary buffer is the oldest
threads go on top and the most recent go down. Am I doing something
wrong?

Thank you.



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

end of thread, other threads:[~2014-11-02 14:41 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.12537.1414865122.1147.info-gnus-english@gnu.org>
2014-11-02  1:48 ` Threads sorting doesn't work? Emanuel Berg
     [not found]   ` <m2h9yi43n3.fsf@gmail.com>
2014-11-02  5:47     ` Emanuel Berg
2014-11-02  6:30       ` Andrey Lisin
2014-11-01 17:59 Andrey Lisin
2014-11-02  0:12 ` Michael Heerdegen
2014-11-02  6:25 ` Brady Trainor
2014-11-02  6:41   ` Andrey Lisin
     [not found]   ` <mailman.12574.1414911747.1147.info-gnus-english@gnu.org>
2014-11-02 14:12     ` Emanuel Berg
2014-11-02 14:41       ` Andrey Lisin

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