Gnus development mailing list
 help / color / mirror / Atom feed
From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen)
Subject: Re: Group sorting
Date: 12 Dec 1995 21:59:56 +0100	[thread overview]
Message-ID: <w8s20qakng3.fsf@gymir.ifi.uio.no> (raw)
In-Reply-To: dreschs@mpd.tandem.com's message of 11 Dec 1995 10:37:16 -0600

dreschs@mpd.tandem.com (Sten Drescher) writes:

> (setq gnus-group-sort-function '(gnus-group-sort-by-level
>                                 gnus-group-sort-by-unread))
> 
> 	This would first do a complete sorting by level, then a complete
> sorting by unread - 2 complete sorts.  I'd want it to work in a single
> sort - the sort would compare the unread keys, and _only_ if they
> matched, compare the level keys. 

Ok, that would be workable.  Gnus could transmogrify that list to

(lambda (g1 g2)
  (or (gnus-group-sort-by-unread g1 g2)
      (and (not (gnus-group-sort-by-unread g2 g1))
	   (gnus-group-sort-by-level g1 g2))))

and give that as the predicate to sort.  Won't this give you the same
results as first using `gnus-group-sort-by-level' as a predicate and
then `gnus-group-sort-by-unread' as a predicate for sort?

I have no idea whether it will be faster, though...

(`gnus-group-sort-by-level' should really be called
`gnus-group-level-less' or something since it is a `less' function and
not an actual sorting function...)

-- 
Home is where the cat is.


  reply	other threads:[~1995-12-12 20:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-12-05 17:31 Sten Drescher
1995-12-06  5:05 ` Lars Magne Ingebrigtsen
1995-12-08 17:32   ` Sten Drescher
1995-12-10 15:16     ` Lars Magne Ingebrigtsen
1995-12-11 16:37       ` Sten Drescher
1995-12-12 20:59         ` Lars Magne Ingebrigtsen [this message]
1995-12-12 22:33           ` Sten Drescher
1995-12-13 17:30             ` Lars Magne Ingebrigtsen
1995-12-14 15:56               ` Hallvard B Furuseth

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=w8s20qakng3.fsf@gymir.ifi.uio.no \
    --to=larsi@ifi.uio.no \
    /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).