From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/45749 Path: main.gmane.org!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.gnus.general Subject: Re: wish list: thread-gathering sort options Date: Sat, 20 Jul 2002 21:07:49 -0400 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1027213744 5217 127.0.0.1 (21 Jul 2002 01:09:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 21 Jul 2002 01:09:04 +0000 (UTC) Cc: ding@gnus.org Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17W5Db-0001M2-00 for ; Sun, 21 Jul 2002 03:09:03 +0200 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 17W5Cp-0000ys-00; Sat, 20 Jul 2002 20:08:15 -0500 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 20 Jul 2002 20:08:40 -0500 (CDT) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id UAA16379 for ; Sat, 20 Jul 2002 20:08:28 -0500 (CDT) Original-Received: (qmail 17018 invoked by alias); 21 Jul 2002 01:07:54 -0000 Original-Received: (qmail 17013 invoked from network); 21 Jul 2002 01:07:54 -0000 Original-Received: from 208-59-178-90.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com (HELO raeburn.org) (208.59.178.90) by gnus.org with SMTP; 21 Jul 2002 01:07:54 -0000 Original-Received: from kal-el.raeburn.org ([2002:d03b:b25a:1:201:2ff:fe23:e26d]) by raeburn.org (8.11.3/8.11.3) with ESMTP id g6L17of14971; Sat, 20 Jul 2002 21:07:50 -0400 (EDT) Original-Received: from raeburn by kal-el.raeburn.org with local (Exim 3.35 #1 (Debian)) id 17W5CP-0006HS-00; Sat, 20 Jul 2002 21:07:49 -0400 Original-To: Truxton Fulton In-Reply-To: (Ken Raeburn's message of "Sat, 20 Jul 2002 20:19:02 -0400") Original-Lines: 58 User-Agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.3.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:45749 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:45749 I wrote: > Truxton Fulton writes: >> I found a work-around that does the trick for me. The thread >> gathering process gathers lower threads up to the higher thread. >> If this could be reversed (since the thread sorting order is also >> reversed), that would solve the problem. > That gets the groups of gathered threads into the proper order, but > wouldn't it put the thread with the latest messages first within each > group? I think I'd want the threads within each gathered group to be > sorted by most-recent number or date too. Looks like I was wrong. I'm getting the threads within the gathered groups in the correct order. Yay! Though I'm a little confused why it's working. Probably I've just got the wrong mental picture for how the gathering is working. But that's much less important than the fact that it's working. :-) Looks like I've got a new thread gathering function to use, for now: (defun kr-gnus-gather-threads-by-subject-reversed (threads) (reverse (gnus-gather-threads-by-subject (reverse threads)))) So, is it safe to use "nreverse" instead of "reverse" in either or both of these cases? And assuming this is in fact the right way to implement this reversal, would it make sense to create yet another customization variable to control this behavior, something like this (untested): (defcustom gnus-summary-place-gathered-threads-last nil "*If non-nil, causes gathered threads to be retained in the original position of the last of the threads gathered. If nil, the gathered threads are placed in the position of the first thread gathered." :group 'gnus-thread :type 'boolean) ... (if gnus-show-threads (if gnus-summary-place-gathered-threads-last (gnus-sort-gathered-threads (reverse (funcall gnus-summary-thread-gathering-function (reverse (gnus-sort-threads (gnus-cut-threads (gnus-make-threads))))))) (gnus-sort-gathered-threads (funcall gnus-summary-thread-gathering-function (gnus-sort-threads (gnus-cut-threads (gnus-make-threads)))))) ;; Unthreaded display. (gnus-sort-articles gnus-newsgroup-headers)))) Or maybe gnus-summary-thread-gathering-function should be allowed to have an alternative form like '(reverse . some-function)? Ken