--- /dev/null
+Return-Path: <amdragon@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 8D63B40BC75\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:58:50 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 Zdnmr4VNQOAQ for <notmuch@notmuchmail.org>;\r
+ Fri, 24 Feb 2012 15:58:49 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU\r
+ [18.7.68.35])\r
+ by olra.theworths.org (Postfix) with ESMTP id 7679240A630\r
+ for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:58:49 -0800 (PST)\r
+X-AuditID: 12074423-b7f9c6d0000008c3-aa-4f482438a1b6\r
+Received: from mailhub-auth-4.mit.edu ( [18.7.62.39])\r
+ by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id E9.3C.02243.934284F4; Fri, 24 Feb 2012 18:58:49 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q1ONwmTC007615; \r
+ Fri, 24 Feb 2012 18:58:48 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1ONwlrJ028047\r
+ (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+ Fri, 24 Feb 2012 18:58:48 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1S152F-0000kB-IM; Fri, 24 Feb 2012 18:58:47 -0500\r
+Date: Fri, 24 Feb 2012 18:58:47 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Mark Walters <markwalters1009@gmail.com>\r
+Subject: Re: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag\r
+Message-ID: <20120224235847.GJ30513@mit.edu>\r
+References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IRYrdT17VU8fA3uP2fyWL1XB6L6zdnMjsw\r
+ eeycdZfd49mqW8wBTFFcNimpOZllqUX6dglcGeuXP2YqaFCv2LNjHVMD41HZLkZODgkBE4mH\r
+ x64xQthiEhfurWfrYuTiEBLYxyhxbtptFghnA6PE6iNnoZyTTBJnZk1lhHCWMEoseb+ZHaSf\r
+ RUBV4u7Pf0wgNpuAhsS2/cvB5ooI6EjcPrQArIZZQFri2+9msBphAQ+JJQ8ngsV5gWrW//nC\r
+ BmILAcUndLayQsQFJU7OfMIC0aslcePfS6BeDrA5y/9xgIQ5BTwlGt8+AisXFVCRmHJyG9sE\r
+ RqFZSLpnIemehdC9gJF5FaNsSm6Vbm5iZk5xarJucXJiXl5qka6ZXm5miV5qSukmRnBYuyjv\r
+ YPxzUOkQowAHoxIPL9MWd38h1sSy4srcQ4ySHExKorwvFD38hfiS8lMqMxKLM+KLSnNSiw8x\r
+ SnAwK4nw2rEB5XhTEiurUovyYVLSHCxK4rwaWu/8hATSE0tSs1NTC1KLYLIyHBxKErzXlYEa\r
+ BYtS01Mr0jJzShDSTBycIMN5gIZvBKnhLS5IzC3OTIfIn2JUlBLn3QeSEABJZJTmwfXC0s4r\r
+ RnGgV4R5d4JU8QBTFlz3K6DBTECD7f+6ggwuSURISTUwyn5NeLUnzTJoXVGScHvDRalFEz7V\r
+ Vcjfn3Dw8lzxWYm3c3i9Tsz1Z5yvbnG7pejqMxXtOu4T4tENV2qX2F6xlfrnru905nDg8gwR\r
+ 9eh7hWcMHkz/skV+/fKmQF2GRcFW//831d++kbL3PMv+c2c+Vf+4sevbzZ3ajySPGD+prwrK\r
+ Urk89WfiDSWW4oxEQy3mouJEAB+/bwwWAwAA\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 Feb 2012 23:58:50 -0000\r
+\r
+Quoth Mark Walters on Feb 15 at 9:03 am:\r
+> This is v5 of the exclude flag series. (v4 was at \r
+> id:"874nv9rv79.fsf@qmul.ac.uk")\r
+> \r
+> This email has 4 sections, an overview of what the patch set is \r
+> trying to achieve, a summary of the changes from v4, some comments on \r
+> the status of the patches in the series and some remaining queries.\r
+> \r
+> OVERVIEW\r
+> \r
+> The current implementation of exclude-tags does not use excludes in\r
+> notmuch-show.c (and thus not in notmuch-show.el). Thus when selecting \r
+> a thread in the search view claiming one matched message you may get \r
+> several matches in show all but one of which are tagged excluded.\r
+> \r
+> The trivial change of adding excludes to show does not work as easily \r
+> as one would like. For example if you try notmuch-show \r
+> id:<deleted message> you get no results (see \r
+> id:"871uqvgrnm.fsf@qmul.ac.uk" for more discussion).\r
+> \r
+> This set moves in a different direction. It returns all the results \r
+> but marks excluded messages with a new flag \r
+> (NOTMUCH_MESSAGE_FLAG_EXCLUDED) and lets the consumer decide what to \r
+> do with them. For example it could start with the message closed in \r
+> emacs show view, it could colour the headerline differently etc.\r
+> \r
+> CHANGES:\r
+> This has been rebased on top of Jani's notmuch-show command line \r
+> parsing patch.\r
+> \r
+> The function notmuch_thread_get_flag_messages function added in v4\r
+> has been removed. Unfortunately (as Austin pointed out) that patch \r
+> broke binary compatibility so should be deferred until we wish to \r
+> bump the library version.\r
+> \r
+> I also fixed a minor bug and a style comment in the emacs part of \r
+> the patch.\r
+> \r
+> STATUS:\r
+> The first 3 patches in the series just add a --no-exclude option\r
+> to notmuch-search.c and notmuch-count.c to "turn off" the excluding.\r
+> (The 3 patches are one for the C code, one for the man pages and \r
+> one for the tests.) I think this change is desirable independently \r
+> of the rest of the series (and indeed Jameson had a use for it\r
+> id:"878vk943ci.fsf@servo.finestructure.net").\r
+> \r
+> QUERIES\r
+> \r
+> 1) As with v4 the api notmuch_query_set_omit_excluded_messages\r
+> remains: without it I can't see how a user can pass a \r
+> notmuch_messages_t object around which does not contain the \r
+> excluded messages. See id:"87fweusabh.fsf@qmul.ac.uk". \r
+\r
+This does seem like a useful simplification. Another possibility\r
+(which may not work in practice) would be to have a utility function\r
+in the CLI that iterated a notmuch_messages_t to the next non-excluded\r
+message. This would push the knowledge of whether or not a format can\r
+represent excluded messages into that format, but I can't see how to\r
+do things like "count" this way.\r
+\r
+> 2) If we have a query which overrides the excludes such as "blah and\r
+> tag:deleted" should the tag:deleted messages still be marked excluded?\r
+> The current implementation does mark them excluded but my preference \r
+> would be not to. What do people think? At the moment 2 tests fail but \r
+> the correct output depends on the above so I will leave them until we\r
+> have a decision on this.\r
+\r
+I could go either way on this, but I think it should still be marked\r
+excluded since it is, after all, excluded.\r
+\r
+> There are some other queries mentioned in v4 but the two above are\r
+> the significant ones.\r
+> \r
+> Best wishes\r
+> \r
+> Mark\r
+> \r
+> \r
+> \r
+> Mark Walters (11):\r
+> cli: add --no-exclude option to count and search.\r
+> cli: Add --no-exclude to the man pages for search and count\r
+> test: add tests for new cli --no-exclude option\r
+> lib: Rearrange the exclude code in query.cc\r
+> lib: Make notmuch_query_search_messages set the exclude flag\r
+> lib: Add the exclude flag to notmuch_query_search_threads\r
+> cli: Make notmuch-show respect excludes.\r
+> man: update manpage for notmuch-show --no-exclude option\r
+> test: update tests to reflect the exclude flag\r
+> cli: omit excluded messages in results where appropriate.\r
+> emacs: show: recognize the exclude flag.\r
+> \r
+> emacs/notmuch-show.el | 19 +++++++++++-\r
+> lib/notmuch-private.h | 8 ++++-\r
+> lib/notmuch.h | 16 ++++++++--\r
+> lib/query.cc | 74 ++++++++++++++++++++++++++++++++++++++------\r
+> lib/thread.cc | 18 +++++++++--\r
+> man/man1/notmuch-count.1 | 7 ++++\r
+> man/man1/notmuch-search.1 | 7 ++++\r
+> man/man1/notmuch-show.1 | 7 ++++\r
+> notmuch-count.c | 19 ++++++++----\r
+> notmuch-search.c | 26 ++++++++++++----\r
+> notmuch-show.c | 31 ++++++++++++++++--\r
+> test/count | 21 +++++++++++++\r
+> test/crypto | 9 +++++-\r
+> test/encoding | 2 +-\r
+> test/json | 6 ++--\r
+> test/maildir-sync | 1 +\r
+> test/multipart | 4 +-\r
+> test/search | 5 +++\r
+> test/thread-naming | 16 +++++-----\r
+> 19 files changed, 246 insertions(+), 50 deletions(-)\r