--- /dev/null
+Return-Path: <aclements@csail.mit.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 C002F431FC9\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 05:40:29 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.3\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_MED=-2.3] 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 wjv3750uwI7q for <notmuch@notmuchmail.org>;\r
+ Fri, 24 Oct 2014 05:40:22 -0700 (PDT)\r
+Received: from outgoing.csail.mit.edu (outgoing.csail.mit.edu [128.30.2.149])\r
+ by olra.theworths.org (Postfix) with ESMTP id 35D1D431FBD\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Oct 2014 05:40:22 -0700 (PDT)\r
+Received: from [104.131.20.129] (helo=awakeningjr)\r
+ by outgoing.csail.mit.edu with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16)\r
+ (Exim 4.72) (envelope-from <aclements@csail.mit.edu>)\r
+ id 1XheAD-0006Vv-LH; Fri, 24 Oct 2014 08:40:17 -0400\r
+Received: from amthrax by awakeningjr with local (Exim 4.84)\r
+ (envelope-from <aclements@csail.mit.edu>)\r
+ id 1XheAD-0001RW-2X; Fri, 24 Oct 2014 08:40:17 -0400\r
+Date: Fri, 24 Oct 2014 08:40:16 -0400\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+To: David Edmondson <dme@dme.org>\r
+Subject: Re: [PATCH v1 1/3] search: Seperately report matching and\r
+ non-matching authors.\r
+Message-ID: <20141024124016.GG7970@csail.mit.edu>\r
+References: <1414140488-29978-1-git-send-email-dme@dme.org>\r
+ <1414140488-29978-2-git-send-email-dme@dme.org>\r
+ <87y4s5vn12.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87y4s5vn12.fsf@qmul.ac.uk>\r
+User-Agent: Mutt/1.5.23 (2014-03-12)\r
+Cc: notmuch@notmuchmail.org\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: Fri, 24 Oct 2014 12:40:29 -0000\r
+\r
+Quoth Mark Walters on Oct 24 at 10:23 am:\r
+> \r
+> Hi\r
+> \r
+> I definitely like the idea: some comments below.\r
+\r
+Agreed.\r
+\r
+> On Fri, 24 Oct 2014, David Edmondson <dme@dme.org> wrote:\r
+> > In addition to the :authors attribute of each search result, include\r
+> > :authors_matched and :authors_non_matched attributes. Both attributes\r
+> > are always included. If there are no non-matching authors, the\r
+> > :authors_non_matched attribute is set to the empty string.\r
+> \r
+> What about having both authors_matched and authors_not_matched as lists\r
+> of authors (ie one string for each author)? Then emacs, for example,\r
+> wouldn't try and parse the string back into authors before\r
+> splitting. And authors_non_matched could be an empty list when\r
+> appropriate which seems more natural than the empty string.\r
+> \r
+> All the above is based on what a client might want in the output rather\r
+> than what is easy or sensible to implement in the C code.\r
+\r
+I was going to suggest exactly the same thing.\r
+\r
+And I think there's a fairly easy way to do it in C code that will\r
+also prevent library interface bloat: instead of introducing new\r
+library APIs to get at this information, just use the existing\r
+notmuch_thread_get_messages API and construct the matched and\r
+non-matched lists in the CLI. Doing it in the CLI wouldn't require\r
+the library to export yet another string list structure, which is\r
+always a huge pain (thanks C!), and wouldn't introduce more "helper"\r
+functions into the library API.\r
+\r
+I think the only disadvantage to doing this would be some duplication\r
+of the {matched_,}authors_{array,hash} logic into the CLI, but those\r
+are only there to support notmuch_thread_get_authors, which I think is\r
+a huge hack and should go away in the long term. (And, by doing this\r
+list building in the CLI, we avoid further embellishing the\r
+unnecessary "get thread authors" API).\r