--- /dev/null
+Return-Path: <xuwang762@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id D59846DE0FB1\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 17:55:38 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.173\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.173 tagged_above=-999 required=5\r
+ tests=[AWL=-0.347, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,\r
+ DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25,\r
+ FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01,\r
+ RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_SBL=0.644,\r
+ URIBL_SBL_A=0.1] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id aULF7_Qbj_54 for <notmuch@notmuchmail.org>;\r
+ Wed, 23 Sep 2015 17:55:36 -0700 (PDT)\r
+Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com\r
+ [209.85.214.179])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id AD8E96DE0C66\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 17:55:36 -0700 (PDT)\r
+Received: by obbzf10 with SMTP id zf10so46968985obb.2\r
+ for <notmuch@notmuchmail.org>; Wed, 23 Sep 2015 17:55:33 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=mime-version:in-reply-to:references:date:message-id:subject:from:to\r
+ :cc:content-type;\r
+ bh=KUpNltgSH28MCXziv5DJqCaJ58irIqvzzH7SS0B0ZH0=;\r
+ b=Digupic0/atqLeOkFpa4P6bnmrHoSVLzff5su9nTA+UZPd2QyIT9MameLOK7ojizk5\r
+ 3RPrMlb849HonLGPGyQmKs6VRL7WmLlhax/ay3DJeIbby0p2Jq5qoAs0DQLGPx/1CBpH\r
+ e6U/czoKDhWpGaG1hMGGjWYRNSP78fIplVjJGOAL6auLAitLXvjsKrLxZHpDbtnSRmcl\r
+ n+aXkIFupcjq9k0UfNQiJOGsdlGnp8tw5iq2zfYlXG2Uhx1JeZq4N56ulemRhOyzaBqI\r
+ ZTgUqRwD8rEVafLTLsPzyc6MuxSpGa+L4EV0BqsisNDObwxP9slwXpR1YKruDhkLIOp0\r
+ zfQQ==\r
+MIME-Version: 1.0\r
+X-Received: by 10.60.144.197 with SMTP id so5mr3923240oeb.29.1443056132540;\r
+ Wed, 23 Sep 2015 17:55:32 -0700 (PDT)\r
+Received: by 10.202.212.204 with HTTP; Wed, 23 Sep 2015 17:55:32 -0700 (PDT)\r
+In-Reply-To: <87zj0c3gei.fsf@zancas.localnet>\r
+References:\r
+ <CAJhTkNh7_hXDLsAGyD7nwkXV4ca6ymkLtFG945USvfqK4ZJEdQ@mail.gmail.com>\r
+ <87fv2a4ctt.fsf@zancas.localnet>\r
+ <CAJhTkNgBdnm18UXC95ryJk5w7fJpa7-1LvdugV3S29fL4kxxhQ@mail.gmail.com>\r
+ <87zj0c3gei.fsf@zancas.localnet>\r
+Date: Wed, 23 Sep 2015 20:55:32 -0400\r
+Message-ID:\r
+ <CAJhTkNhp=mMPsD7hkGKW4eY9WWOuS2pf=x4sDiLnx9ref9JTew@mail.gmail.com>\r
+Subject: Re: Possible some threads are not complete due to bug?\r
+From: Xu Wang <xuwang762@gmail.com>\r
+To: David Bremner <david@tethera.net>\r
+Content-Type: text/plain; charset=UTF-8\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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: Thu, 24 Sep 2015 00:55:38 -0000\r
+\r
+On Wed, Sep 23, 2015 at 6:44 PM, David Bremner <david@tethera.net> wrote:\r
+> Xu Wang <xuwang762@gmail.com> writes:\r
+>\r
+>> Because when I do a notmuch search for that message by message ID with\r
+>> --output=threads, it gives a different thread ID.\r
+>>\r
+>>> Isn't that what your first command tells you?\r
+>> Well yes, but I wanted to confirm that that is indeed the reason. I\r
+>> have heard in someone saying that debugging is process of confirming\r
+>> things that should be true.\r
+>\r
+> I'm still confused. It sounds like you gave the same command twice and\r
+> got different answers. Can you maybe show the complete sequence of\r
+> commands and output (assuming it's not too large)?\r
+\r
+Dear David, thank you for your kind persistence. I apologize for the\r
+lack of clarity in my writing. Below is the full sequence of commands\r
+(I just subsitute MYMSGID and MYMSGIDREPLY for two message IDs) as\r
+well as my thought process.\r
+\r
+$ notmuch search --output=threads "id:MYMSGID"\r
+thread:000000000000a125\r
+$ notmuch search --output=messages "thread:000000000000a125"\r
+id:MYMSGID\r
+$\r
+# I know that MYMSGIDREPLY did respond to that message. I have it in\r
+my mutt mailbox and it shows the down-right arrow signifying this. I\r
+inspect the headers and there is indeed a header in MYMSGIDREPLY that\r
+says "In-Reply-To: <MYMSGID>". I then do...\r
+$ notmuch search --output=threads "id:MYMSGIDREPLY"\r
+thread:000000000000c125\r
+$ notmuch search --output=messages "thread:000000000000c125"\r
+id:MYMSGIDREPLY\r
+$\r
+\r
+# What I expected (and did not get) was the following output:\r
+$ notmuch search --output=threads "id:MYMSGID"\r
+thread:000000000000a125\r
+$ notmuch search --output=messages "thread:000000000000a125"\r
+id:MYMSGID\r
+id:MYMSGIDREPLY\r
+$\r
+\r
+# after regenerating the notmuch database, I did indeed get the output\r
+that I expected.\r
+\r
+Kind regards,\r
+\r
+Xu\r