Gnus development mailing list
 help / color / mirror / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
Cc: ding@gnus.org
Subject: Re: wish list: thread-gathering sort options
Date: Sat, 20 Jul 2002 21:07:49 -0400	[thread overview]
Message-ID: <tx1ofd1dh22.fsf@raeburn.org> (raw)
In-Reply-To: <tx1sn2ec4qx.fsf@raeburn.org> (Ken Raeburn's message of "Sat, 20 Jul 2002 20:19:02 -0400")

I wrote:
> Truxton Fulton <trux@truxton.com> 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



      reply	other threads:[~2002-07-21  1:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-29 18:09 Ken Raeburn
2002-04-29 19:50 ` Kai Großjohann
2002-05-14  8:23   ` Ken Raeburn
2002-05-14  9:32     ` Kai Großjohann
2002-05-14 10:23       ` Ken Raeburn
2002-05-14 10:50     ` Kai Großjohann
2002-05-14 14:16       ` Ken Raeburn
2002-05-14 15:23     ` Kai Großjohann
2002-05-15 16:03       ` Ken Raeburn
2002-05-15 16:53         ` Kai Großjohann
2002-07-13 22:40     ` Truxton Fulton
2002-07-21  0:19       ` Ken Raeburn
2002-07-21  1:07         ` Ken Raeburn [this message]

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=tx1ofd1dh22.fsf@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=ding@gnus.org \
    /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).