--- /dev/null
+Return-Path: <markwalters1009@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 olra.theworths.org (Postfix) with ESMTP id F366A431E62\r
+ for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:02:54 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ 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 OE6iGE1nwG3h for <notmuch@notmuchmail.org>;\r
+ Wed, 15 Feb 2012 01:02:52 -0800 (PST)\r
+Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
+ [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 89F02431FBD for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:02:52 -0800\r
+ (PST)\r
+Received: by wgbdt12 with SMTP id dt12so647956wgb.2\r
+ for <notmuch@notmuchmail.org>; Wed, 15 Feb 2012 01:02:51 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+ h=from:to:cc:subject:date:message-id:x-mailer;\r
+ bh=xfWa4iSfYeIcjj54sgfNbQwlGO+eZFCPcU7+0dVNWD0=;\r
+ b=kU5Yh3GfY3sHgGT1uUtmb4bYEtpsmE1/FwMQnaj4XVd5nnnM7O2jXUlve1uujDt0zf\r
+ yk7W0Kr+B6vXalkSjLXtR3KN6YiTnpzqyEoeN+zN0Yba8hN3dAkkzRLMdn0NUY/q/3Ho\r
+ kbiowFq4m2ofEKvbWPWZhwGlu0amuEiTbKHRo=\r
+Received: by 10.216.133.91 with SMTP id p69mr9154635wei.30.1329296571188;\r
+ Wed, 15 Feb 2012 01:02:51 -0800 (PST)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223]) by mx.google.com with ESMTPS id\r
+ da8sm32094410wib.6.2012.02.15.01.02.48 (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Wed, 15 Feb 2012 01:02:49 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC PATCH v5 00/11] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag\r
+Date: Wed, 15 Feb 2012 09:03:28 +0000\r
+Message-Id: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\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: Wed, 15 Feb 2012 09:02:55 -0000\r
+\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
+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
+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
+\r
+-- \r
+1.7.2.3\r
+\r