--- /dev/null
+Return-Path: <prvs=012199835=jrosenthal@jhu.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 25841429E43\r
+ for <notmuch@notmuchmail.org>; Sun, 3 Nov 2013 13:36:30 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id l82wFI1qyIdZ for <notmuch@notmuchmail.org>;\r
+ Sun, 3 Nov 2013 13:36:22 -0800 (PST)\r
+X-Greylist: delayed 3602 seconds by postgrey-1.32 at olra;\r
+ Sun, 03 Nov 2013 13:36:22 PST\r
+Received: from smtpauth.johnshopkins.edu (smtpauth.johnshopkins.edu\r
+ [162.129.8.201]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 7BA3A429E38\r
+ for <notmuch@notmuchmail.org>; Sun, 3 Nov 2013 13:36:22 -0800 (PST)\r
+X-IronPort-AV: E=Sophos;i="4.93,627,1378872000"; d="scan'208";a="303075692"\r
+Received: from c-69-137-43-192.hsd1.md.comcast.net (HELO lucky)\r
+ ([69.137.43.192])\r
+ by ipex2.johnshopkins.edu with ESMTP/TLS/DHE-RSA-AES128-SHA;\r
+ 03 Nov 2013 15:36:18 -0500\r
+Received: from jkr by lucky with local (Exim 4.80)\r
+ (envelope-from <jrosenthal@jhu.edu>)\r
+ id 1Vd4Ot-00058J-IM; Sun, 03 Nov 2013 15:35:59 -0500\r
+From: Jesse Rosenthal <jrosenthal@jhu.edu>\r
+To: Jani Nikula <jani@nikula.org>,\r
+ Felipe Contreras <felipe.contreras@gmail.com>, notmuch@notmuchmail.org\r
+Subject: Re: Getting the right root mail of the thread\r
+In-Reply-To: <87zjpmoqtz.fsf@nikula.org>\r
+References: <5274f93e254b5_6de7f51e7849@nysa.notmuch>\r
+ <87zjpmoqtz.fsf@nikula.org>\r
+User-Agent: Notmuch/0.16+119~g1eecfbd (http://notmuchmail.org) Emacs/24.1.1\r
+ (i686-pc-linux-gnu)\r
+Date: Sun, 03 Nov 2013 15:35:59 -0500\r
+Message-ID: <87k3gprzo0.fsf@jhu.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 03 Nov 2013 21:36:30 -0000\r
+\r
+Jani Nikula <jani@nikula.org> writes:\r
+> I think it's actually worse than what your example demonstrates. It's\r
+> the subject of the newest/oldest *matching* message that gets used. In\r
+> your example, the first/last messages in the thread apparently match\r
+> your query.\r
+\r
+The behavior is there because subjects frequently change in long\r
+threads, and this allows the subject to refer to the most recent unread\r
+message (if we're sorting in the default order). The \r
+reason I requested and wrote in this behavior five years ago or so (my\r
+only c contribution ever) was that numerous business associates would\r
+keep email lists by replying and changing the subject. This is *very*\r
+common outside of programming circles. Even in programming circles,\r
+subjects frequently change on mailing list (with a "[was: ...]"\r
+appended). \r
+\r
+The current behavior can be annoying, but the old behavior could make\r
+the MUA quite unusable in a number of circumstances. (And yes, an MUA\r
+that fails on reading mail from senders with bad emailing practices is\r
+unusable for me.)\r
+\r
+Maybe there should be a "show original subject" toggle? That wouldn't be\r
+too hard, though it would require another call to the library and\r
+regenerating the search results.\r