all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Michael Welsh Duggan <mwd@md5i.com>
Cc: 21462@debbugs.gnu.org
Subject: bug#21462: 25.0.50; Gnus thread gathering and sorting inverted
Date: Sun, 07 Feb 2016 16:53:14 +1100	[thread overview]
Message-ID: <87si15awxh.fsf@gnus.org> (raw)
In-Reply-To: <878u8cdfmt.fsf@md5i.com> (Michael Welsh Duggan's message of "Fri, 11 Sep 2015 13:34:18 -0400")

Michael Welsh Duggan <mwd@md5i.com> writes:

> I have been attempting to implement the following use case:
>
> I have a gnus group that receives messages with subjects that look sort
> of like this:
>
> Some title, part 1, by X
> Some title, part 2, by X
> Some other title, part 32, by Y
>
> I gather these into threads by title using my own simplification
> function which I add to `gnus-simplify-subject-functions' in this
> group.  I also set `gnus-thread-hide-subtree' to `t' in this group, so
> each title takes up one Summary line.
>
> I then want to sort these threads by the *latest* message in the
> thread.  Thus, when a new part is received, the entire thread shows up
> as "newer".  To do this, I created by own function to set
> `gnus-thread-sort-functions' to.  This looks like this:
>
> (defun md5i-thread-sort-by-most-recent-date-reverse (h1 h2)
>   (<= (gnus-thread-latest-date h1) (gnus-thread-latest-date h2)))
>
> Unfortunately, this fails in many cases due to the fact that
> `gnus-summary-prepare' gathers thread after sorting threads.  In my case
> I need the reverse, and I think that the reverse always makes sense.  I
> have a patch which does this, and has been working for me for half a
> year or so.  I suggest you add this or an equivalent change to Gnus.
> Feel free to rewrite this patch completely.  I wrote it long enough ago
> that I do not remember why I needed to create `gnus-make-threaded-sort'.

There is a separater `gnus-sort-gathered-threads-function' -- doesn't it
do what you want it to?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2016-02-07  5:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-11 17:34 bug#21462: 25.0.50; Gnus thread gathering and sorting inverted Michael Welsh Duggan
2016-02-07  5:53 ` Lars Ingebrigtsen [this message]
2016-02-07  7:40   ` Michael Welsh Duggan
2016-02-08  4:51     ` Lars Ingebrigtsen
2016-02-08 17:08       ` Michael Welsh Duggan
2016-02-09  0:50         ` Lars Ingebrigtsen

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=87si15awxh.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=21462@debbugs.gnu.org \
    --cc=mwd@md5i.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.