Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CF9DD431FCB for ; Sun, 19 Aug 2012 18:53:08 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d6Yp09xu-dzz for ; Sun, 19 Aug 2012 18:53:06 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id B6337431FAF for ; Sun, 19 Aug 2012 18:53:06 -0700 (PDT) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 4192266E00E1 for ; Sun, 19 Aug 2012 18:53:06 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (unknown [76.89.192.57]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 60CE766E00DF for ; Sun, 19 Aug 2012 18:53:04 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id C52DC77E; Sun, 19 Aug 2012 18:53:03 -0700 (PDT) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH 00/11] add recipients to search output Date: Sun, 19 Aug 2012 18:52:39 -0700 Message-Id: <1345427570-26518-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.10.4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Aug 2012 01:53:09 -0000 This series is an attempt to add thread recipients to the search output. My personal overall goal of this series is to support the handling of drafts in the emacs ui. For drafts we want to see recipients, instead of authors, in the search output. I can imagine other uses for this series as well, though. The first four patches generalize the author list handling in thread objects to handle any address list. These patches could be applied regardless of if the rest of the series is accepted. After that we modify the thread constructor such that it can hold thread recipients as well. Since there is overhead in retrieving thread recipients from the message files (recipients are not stored in the database) this is handled with a switch. Further patches add the new switch to the search CLI that adds thread recipients to the structured output formats. I didn't modify the text output format, since there is no way to extend it. I can imagine tweaking the text output such that the author field is instead replaced by the recipients (as is done for the emacs UI at the end of the series), but that's not done here. In the emacs UI, I add a new toggle function that will toggle display of thread authors or recipients in the 'authors' field of the search output. It's unfortunate that this ambiguity in that field name remains, but I didn't know how to change that cleanly. I'm working on some tests for the new emacs functionality that I'll include in the inevitable v2 of this series. The last patch is mostly just a tickle to suggest adding the recipients to the database. It would make the --include-recipient searches much faster of course, but it might be overhead in the database that folks aren't interested in. As always, feedback, review, and comments are much appreciated. jamie.