From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/4338 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: 10 Dec 1995 16:16:01 +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> NNTP-Posting-Host: coloc-standby.netfonds.no X-Trace: main.gmane.org 1035145099 29269 80.91.224.250 (20 Oct 2002 20:18:19 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 20:18:19 +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 HAA31604 for ; Sun, 10 Dec 1995 07:44:30 -0800 Original-Received: from surt.ifi.uio.no (4867@surt.ifi.uio.no [129.240.76.2]) by ifi.uio.no with ESMTP (8.6.11/ifi2.4) id for ; Sun, 10 Dec 1995 16:16:03 +0100 Original-Received: (from larsi@localhost) by surt.ifi.uio.no ; Sun, 10 Dec 1995 16:16:03 +0100 Original-To: ding@ifi.uio.no In-Reply-To: dreschs@mpd.tandem.com's message of 08 Dec 1995 11:32:27 -0600 Original-Lines: 28 Xref: main.gmane.org gmane.emacs.gnus.general:4338 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:4338 dreschs@mpd.tandem.com (Sten Drescher) writes: > I want to sort decending by unread, and ascending by level, so > that doesn't do it. No, that's right... I think you'll have to write your own comparison functions to do that: (defun sten-sort (info1 info2) (let ((n1 (car (gnus-gethash (gnus-info-group info1) gnus-newsrc-hashtb))) (n2 (car (gnus-gethash (gnus-info-group info2) gnus-newsrc-hashtb)))) (or (< (gnus-info-level info1) (gnus-info-level info2)) (and (= (gnus-info-level info1) (gnus-info-level info2)) (< (or (and (numberp n1) n1) 0) (or (and (numberp n2) n2) 0)))))) Or something like that. (Would it be the other way around, perhaps?) > Of course, I also want it to take a reasonable > amount of time, and putting multiple 'keys' in gnus-group-sort-function > causes a linear increase in the time required, so I'm doing without the > level sort. ;( Is making a better sort algorithm (passing a list of keys > to compare rather than individual sorts on each key) on the to-do list? Nope. Could you illustrate what you had in mind? -- Home is where the cat is.