[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

About Wanderlust threading



Hi,

I'm finding Wanderlust's threading somewhat deficient.  In particular,
Wanderlust appears unable to stich incomplete threads -- threads in
which one or more messages are missing.  For example, most
conversations I have consist of odd-numbered mails in my %Sent folder,
and even-numbered ones in my %INBOX; Wanderlust presents the latter as
separate messages.  (Yes, I know about wl-summary-search-parent-by-subject)
I've looked at the code, here are my findings, for future reference.

There are two headers that control threading.  In-Reply-To and
References.  In-Reply-To contains the Message-ID of the parent, while
References contains the whole chain of parents of the current message.

Now it turns out that Wanderlust does not look at the full References
header; it merely considers the value of In-Reply-To or the last entry
in References (depending on elmo-msgdb-prefer-in-reply-to-for-parent).
It then appears to use this value in order to construct a summary
buffer by repeatedly calling wl-summary-insert-thread.

Assuming the above is correct, it looks to me like it would not be
quite trivial to change the code to use a more refined algorithm:

 - the msgdb only contains a single parent, not the full References;
 - using a more refined algorithm might require invalidating (parts
   of) the cache when a new message arrives and fills a hole;
 - using a more refined algorithm will break multi folders.

-- Juliusz