From: larsi@ifi.uio.no (Lars Magne Ingebrigtsen)
Subject: Re: Group sorting
Date: 10 Dec 1995 16:16:01 +0100 [thread overview]
Message-ID: <w8sg2etkkzy.fsf@surt.ifi.uio.no> (raw)
In-Reply-To: dreschs@mpd.tandem.com's message of 08 Dec 1995 11:32:27 -0600
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.
next prev parent reply other threads:[~1995-12-10 15:16 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 [this message]
1995-12-11 16:37 ` Sten Drescher
1995-12-12 20:59 ` Lars Magne Ingebrigtsen
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=w8sg2etkkzy.fsf@surt.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).