Gnus development mailing list
 help / color / mirror / Atom feed
From: Andrew Cohen <cohen@bu.edu>
To: ding@gnus.org
Subject: Re: nnvirtual
Date: Fri, 05 May 2017 20:51:46 +0800	[thread overview]
Message-ID: <87mvar1n6l.fsf@hanan> (raw)
In-Reply-To: <87r3031p4b.fsf@hanan>


>>>>> "Andrew" == Andrew Cohen <cohen@bu.edu> writes:

    Eric> How does sorting work in select groups? Right now gnus-search
    Eric> does a pass in `gnus-search-run-query', sorting on rsv, but
    Eric> since nearly all engines return a score of 100, it's fairly
    Eric> meaningless.

    Eric> Summary buffer articles really are sorted according to the
    Eric> order returned by `gnus-search-run-query', which I find odd:
    Eric> shouldn't the normal `gnus-thread|article-sort-functions'
    Eric> routine kick in after group creation?

    Andrew> Yes, and that is how it behaves for me---nnselect buffers
    Andrew> are sorted exactly like any other gnus buffer. Not for you?
    Andrew> I wonder why...

    Andrew> (Aside: Various gnus functions require the article list to
    Andrew> be non-decreasing so in general the way nnselect works is to
    Andrew> sort the selection by group, and then ascending article
    Andrew> number within each group. This is how regular groups operate
    Andrew> as well. Any subsequent sorting in the summary buffer is
    Andrew> "virtual" in the sense that the article list itself isn't
    Andrew> changed.).

And just to be a bit clearer on sorting.

Gnus uses 2 different sorting functions: one for threaded display and
one for unthreaded display. For unthreaded display the default is to
sort by number, but you can sort any way you like (using either the
canned gnus sort predicates or by rolling your own).

As mentioned in my previous message gnus really wants article lists to
be in non-decreasing order internally, so this means that a default
unthreaded summary buffer will appear to be in the same order as the
article list. For nnselect we first sort the selected articles by group
and then ascending order within the group. This is usually the way they
are retrieved in nnir (more or less deliberately) so it gives the
appearance of using the order in which they are retrieved in nnir as the
sort order but this isn't true; just try a different setting for
gnus-article-sort-functions, for example this one:

(setq gnus-article-sort-functions
  '(gnus-article-sort-by-number
    gnus-article-sort-by-subject))

(and of course you can check similar things if you are using a threaded
display).

So currently to use the RSV for sorting purposes requires constructing
predicates that look at the RSV. This is trivial to do (and I'll
probably include them as part of nnselect or in gnus-sum with the other
sorting predicates at some point). But we can (and probably should)
ignore any sorting issues coming out of gnus-search.

Best,
Andy




  reply	other threads:[~2017-05-05 12:51 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 12:31 nnvirtual Andrew Cohen
2017-05-03 18:00 ` nnvirtual Eric Abrahamsen
2017-05-04  1:06   ` nnvirtual Andrew Cohen
2017-05-05  4:30     ` nnvirtual Eric Abrahamsen
2017-05-05 12:09       ` nnvirtual Andrew Cohen
2017-05-05 12:51         ` Andrew Cohen [this message]
2017-05-05 15:46         ` nnvirtual Eric Abrahamsen
2017-05-06  0:20           ` nnvirtual Andrew Cohen
2017-05-07  2:39             ` nnvirtual Eric Abrahamsen
2017-05-12 15:38 ` nnvirtual Steinar Bang
2017-05-12 17:42   ` nnvirtual Adam Sjøgren
2017-05-13  0:17     ` nnvirtual Harry Putnam
2018-04-11 19:42 ` nnvirtual Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mvar1n6l.fsf@hanan \
    --to=cohen@bu.edu \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).