unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Austin Clements <amdragon@MIT.EDU>
To: notmuch@notmuchmail.org
Subject: Re: excessive thread fusing
Date: Sun, 20 Apr 2014 13:46:01 -0400	[thread overview]
Message-ID: <20140420174601.GC25817@mit.edu> (raw)
In-Reply-To: <20140420164812.GB25817@mit.edu>

Quoth myself on Apr 20 at 12:48 pm:
> Quoth Andrei POPESCU on Apr 20 at 12:04 am:
> > On Sb, 19 apr 14, 18:52:02, Eric wrote:
> > > 
> > > This may not actually be any help, but both hypermail and mhonarc agree
> > > that two messages form a separate thread from the rest. I believe that
> > > the latter, at least, is the JWZ algorithm.
> > 
> > mutt concurs.
> 
> Can anyone explain why JWZ *doesn't* have the same problem?  I don't
> see how this heuristic doesn't doom it to the same fate:
> 
>   The References field is populated from the ``References'' and/or
>   ``In-Reply-To'' headers. If both headers exist, take the first thing
>   in the In-Reply-To header that looks like a Message-ID, and append
>   it to the References header.
> 
> Given this, even considering only messages 18 and 52 (which "should"
> be in different threads), JWZ should find the common "parent"
> e.fraga@ucl.ac.uk and link them in to the same thread:
> 
> Add 18 (step 1)
> - The combined "references" list is <ID17> <e.fraga@ucl.ac.uk>
> - Creates and links containers 17 <- e.fraga@ucl.ac.uk <- 18 where the
>   first two are empty
> 
> Add 52 (step 1)
> - The combined "references" list is <ID31> <ID32> <ID39>
>   <e.fraga@ucl.ac.uk>
> - Creates and links containers 31 <- 32 <- 39
> - Also considers container e.fraga@ucl.ac.uk, but this is already
>   linked, so it doesn't change it
> - Creates container 52 and links e.fraga@ucl.ac.uk <- 52 (step 1C)
> 
> 18 and 52 will later get promoted over their empty parent (step 4),
> but will remain in the same thread.
> 
> What am I missing?  Or are these other MUAs not using pure JWZ?

I dug in to mutt's mutt_sort_threads a bit.  It's not using JWZ,
though it's something similar.  The most salient thing may be how it
handles in-reply-to and references:

1. If a message has both in-reply-to and references, the parent chain
   is the *last* in-reply-to ID and then the references from right to
   left (skipping the last reference ID if it's the same as the last
   in-reply-to ID).  (See also mutt_parse_references.)
2. If a message has only in-reply-to, the parent chain is *all* of the
   IDs in in-reply-to *from right to left* (e.g., the right-most one
   is the immediate parent).
3. If a message has only references, the parent chain is that, from
   right to left.

Like JWZ, mutt creates and links together "empty containers" as it
scans the parent chain towards the root, though unlike JWZ it stops
when it finds a non-empty container or a container that already has a
parent.

  reply	other threads:[~2014-04-20 17:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-19 12:33 excessive thread fusing David Bremner
2014-04-19 17:52 ` Eric
2014-04-19 21:04   ` Andrei POPESCU
2014-04-20 16:48     ` Austin Clements
2014-04-20 17:46       ` Austin Clements [this message]
2014-04-20  7:14 ` [RFC PATCH] " Mark Walters
     [not found]   ` <87oazwjq1e.fsf@yoom.home.cworth.org>
2014-04-20 12:03     ` Mark Walters
2014-04-21  7:20       ` Mark Walters
2014-04-21 16:20         ` Austin Clements
2022-01-01  0:26         ` David Bremner
2014-04-20 12:59     ` David Bremner

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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140420174601.GC25817@mit.edu \
    --to=amdragon@mit.edu \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).