--- /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 6C5116DE141E\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Jun 2015 11:32:15 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.567\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.567 tagged_above=-999 required=5\r
+ tests=[AWL=-0.016, 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_H2=-0.001,\r
+ SPF_PASS=-0.001] 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 tX3JgLDrZahZ for <notmuch@notmuchmail.org>;\r
+ Sun, 14 Jun 2015 11:32:13 -0700 (PDT)\r
+Received: from mail-ob0-f171.google.com (mail-ob0-f171.google.com\r
+ [209.85.214.171])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id 1F9326DE0B7C\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Jun 2015 11:32:13 -0700 (PDT)\r
+Received: by obbsn1 with SMTP id sn1so50996774obb.1\r
+ for <notmuch@notmuchmail.org>; Sun, 14 Jun 2015 11:32:11 -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
+ :content-type; bh=vrmPCVUwWWa04kETQ3s+/reSL1onyNgu764RQi1UXXA=;\r
+ b=021jqAdFOpk4YinCo0ULHUnNudKxtrBbm2W3C9ySfB2EBKAprFACmP6KAGQWGIqldx\r
+ rfoMjtneqM0GA2/pXD4uXBDpk2x4wFjZvCfC6l84/ECDfUiQddk4STSt/MVcLKRnRRLO\r
+ Jndl8e3auz57xrCf+XstAA7CaFBkHvEpPBNyYQQ6KLnT0spgEbj0zanJFsSMfD65PS6U\r
+ x0GwkqxzrMvzklO462rhlb2kXvkJ1bSMGHQRPe3KezXug3QFfL6kelkm4dv3tdXe7UnT\r
+ ILSomCkLr4dte7TgfnDs21b60ARPoiQgI9DyHuzjz161jQqhwHt0OPDrYqTPvcgK1AtV\r
+ 3JNw==\r
+MIME-Version: 1.0\r
+X-Received: by 10.60.177.73 with SMTP id co9mr20504975oec.5.1434306730055;\r
+ Sun, 14 Jun 2015 11:32:10 -0700 (PDT)\r
+Received: by 10.182.241.167 with HTTP; Sun, 14 Jun 2015 11:32:09 -0700 (PDT)\r
+In-Reply-To: <20150614082258.GD17381@chitra.no-ip.org>\r
+References:\r
+ <CAJhTkNhYew6H-bptACTew3gN3DLWg6agTYu8hAkdwFS=z4VFWg@mail.gmail.com>\r
+ <20150613205552.GC17381@chitra.no-ip.org>\r
+ <20150614082258.GD17381@chitra.no-ip.org>\r
+Date: Sun, 14 Jun 2015 14:32:09 -0400\r
+Message-ID:\r
+ <CAJhTkNgDxySBgW1CjLg5WHkLnFaGx+0dUWE+k6HeoPjQid8WKw@mail.gmail.com>\r
+Subject: Re: search query "replytoid:<blah>"\r
+From: Xu Wang <xuwang762@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Content-Type: text/plain; charset=UTF-8\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: Sun, 14 Jun 2015 18:32:15 -0000\r
+\r
+On Sun, Jun 14, 2015 at 4:22 AM, Suvayu Ali <fatkasuvayu+linux@gmail.com> wrote:\r
+> On Sat, Jun 13, 2015 at 10:55:52PM +0200, Suvayu Ali wrote:\r
+>> On Sat, Jun 13, 2015 at 02:47:00PM -0400, Xu Wang wrote:\r
+>> >\r
+>> > Is it possible to search based on which message ID a message\r
+>> > *responds* to? For example, suppose message id is MESSAGEID. I want to\r
+>> > find all emails that responded to MESSAGEID. How to enter such a query\r
+>> > into notmuch?\r
+>>\r
+>> AFAIK, this is not possible. Notmuch does not allow searching special\r
+>> headers. You could probably write a script using the threads output\r
+>> format to get the thread, and then use formail to find the responses.\r
+>\r
+> Try the attached script. It accepts notmuch queries by message id.\r
+> E.g. to get the responses to your OP, you can do:\r
+>\r
+> $ ./nm-ack id:CAJhTkNhYew6H-bptACTew3gN3DLWg6agTYu8hAkdwFS=z4VFWg@mail.gmail.com\r
+> id:877fr79upd.fsf@maritornes.cs.unb.ca id:20150613205552.GC17381@chitra.no-ip.org\r
+>\r
+> The first one is David's response, the second one is mine.\r
+>\r
+> Hope this helps,\r
+>\r
+> --\r
+> Suvayu\r
+\r
+These are exactly what I was looking for! I tried Suvayu's script with\r
+success, and although I did not try the script referenced by David's\r
+email, the goal is exactly my goal and thus it seems it should do as I\r
+would like as well.\r
+\r
+Thank you so very much to you for persisting in helping me, even\r
+despite the lack of clarity in my messages. I highly appreciate you\r
+and your time.\r
+\r
+Happy regards,\r
+\r
+Xu\r