From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4362 Path: main.gmane.org!not-for-mail From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen) Newsgroups: gmane.emacs.gnus.general Subject: Re: Group sorting Date: 12 Dec 1995 21:59:56 +0100 Organization: Dept. of Informatics, University of Oslo, Norway Sender: larsi@ifi.uio.no Message-ID: References: <55ka4b8lka.fsf@galil.austnsc.tandem.com> <557n07h36c.fsf@galil.austnsc.tandem.com> <55d99v7e0z.fsf@galil.austnsc.tandem.com> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035145119 29328 80.91.224.250 (20 Oct 2002 20:18:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:18:39 +0000 (UTC) Return-Path: ding-request@ifi.uio.no Original-Received: from ifi.uio.no (ifi.uio.no [129.240.64.2]) by miranova.com (8.6.11/8.6.9) with ESMTP id NAA12760 for ; Tue, 12 Dec 1995 13:49:20 -0800 Original-Received: from gymir.ifi.uio.no (4867@gymir.ifi.uio.no [129.240.80.2]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Tue, 12 Dec 1995 21:59:58 +0100 Original-Received: (from larsi@localhost) by gymir.ifi.uio.no ; Tue, 12 Dec 1995 21:59:57 +0100 Original-To: ding@ifi.uio.no In-Reply-To: dreschs@mpd.tandem.com's message of 11 Dec 1995 10:37:16 -0600 Original-Lines: 29 Xref: main.gmane.org gmane.emacs.gnus.general:4362 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4362 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.