From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.90.87.14 with SMTP id k14cs1246848agb; Wed, 30 Dec 2009 09:01:42 -0800 (PST) Received: by 10.229.129.193 with SMTP id p1mr6660843qcs.92.1262192501573; Wed, 30 Dec 2009 09:01:41 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id 8si20593805qyk.56.2009.12.30.09.01.41; Wed, 30 Dec 2009 09:01:41 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 30DE01D78878; Wed, 30 Dec 2009 12:01:41 -0500 (EST) Received: from pion.club.cc.cmu.edu (PION.CLUB.CC.cmu.edu [128.237.157.88]) by rubyforge.org (Postfix) with ESMTP id B4EA81858267 for ; Wed, 30 Dec 2009 12:01:37 -0500 (EST) Received: from rlane by pion.club.cc.cmu.edu with local (Exim 4.69) (envelope-from ) id 1NQ1vV-0008TI-7A; Wed, 30 Dec 2009 12:01:37 -0500 From: Rich Lane To: William Morgan In-reply-to: <1262182085-sup-1405@masanjin.net> References: <1261485246-sup-4236@tilus.net> <1261938751-sup-9421@zyrg.net> <1262136474-sup-312@tilus.net> <1262182085-sup-1405@masanjin.net> Date: Wed, 30 Dec 2009 12:01:37 -0500 Message-Id: <1262190807-sup-434@zyrg.net> User-Agent: Sup/git Cc: sup-devel Subject: Re: [sup-devel] [PATCH] XapianIndex.each_message_in_thread_for yields messages in cronological order X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org Excerpts from William Morgan's message of Wed Dec 30 09:10:54 -0500 2009: > Reformatted excerpts from Tero Tilus's message of 2009-12-29: > > For what I know you might trigger this by replying to many messages at > > once and thus having a list of ids in-reply-to header (in whatever > > order of course, rfc doesn't require any particular order) instead of > > one. Then when you reply to this message using MUA that is bold > > enough to try to form References: with the standard in-reply-to + > > my-id method even if RFC 2822 says "trying to form a References: field > > for a reply that has multiple parents is discouraged and how to do so > > is not defined in this document". You end up having References: which > > has bunch of (thread-wise) random ids in random order instead of the > > rfc-specified original, reply, replytoreply, etc. chain of ids. > > It's worth reading the top bit of http://www.jwz.org/doc/threading.html > for what In-reply-to: and References: look like in practice. (Basically: > a mess, and the references: header in particular can be truncated in any > way that any MUA feels is reasonable.) > > The threading used by the Ferret indexer is a pretty faithful > reproduction of the algorithm described on that page. I'm not that > familiar with the one used by the Xapian index, but a cursory > examination suggests it's a little more fragile. I'm assuming you're talking about each_message_in_thread_for, since that's the only Index method that deals with threading. In what order does ThreadSet#add_message expect to get messages in? This determines the order from Index#each_message_in_thread_for. I'd assumed an arbitrary ordering would work because add_message needs to handle this case anyway to work with messages arriving out of order from the source (which happens all the time) and then added to the Inbox threadset. AFAICT JWZ's algorithm should work regardless of the order messages handed to it. _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel