--- /dev/null
+Return-Path: <novalazy@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 68082431FC0\r
+ for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:38 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_FROM=0.001, 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 hDcrxwT93ZB2 for <notmuch@notmuchmail.org>;\r
+ Wed, 20 Jun 2012 06:29:38 -0700 (PDT)\r
+Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com\r
+ [209.85.210.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id D0938431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:37 -0700 (PDT)\r
+Received: by mail-pz0-f53.google.com with SMTP id g9so12291942dad.26\r
+ for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:29:37 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+ bh=P/4DMCW/lNuO8mr62zv8MknP/3u1G8WgL+koyerSrPA=;\r
+ b=0OgTnGDrOs635HxV/d9ai3z8sq+/9r4jFhw1fsBUkfyJ7/ZzGYmupn9hVFYf7dOJmI\r
+ 2assmvTOweXTqnYgMX1V3ShALPPXbN3JYw2t3on+oRmeg/EZkRHLl/Dh4gicXGv4NJy0\r
+ +tdbRyNr4NHkpBy61CA9ODxYMoyYPS7LWg0xtZZSg0U2WOe1bGv0VbuRyQqe7uGQo/Qh\r
+ dVBS4Bddy2U0aa0x9G5Q8Gm17sgfIZo4KVRKM9NgH/vrwi79Uv67Pjut8oKcsZJcWtZd\r
+ jNHgdhG0DUXzbMW7R89+hsFIahlM4PRk+C8EWRfl68Nzam42oAHkvT27c0PN0bmld/j9\r
+ /Sxw==\r
+Received: by 10.68.221.10 with SMTP id qa10mr74949437pbc.154.1340198976334;\r
+ Wed, 20 Jun 2012 06:29:36 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+ [220.233.42.215])\r
+ by mx.google.com with ESMTPS id hb5sm31927706pbc.58.2012.06.20.06.29.33\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Wed, 20 Jun 2012 06:29:35 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/8] cli: add --exclude=all option to notmuch-search.c\r
+Date: Wed, 20 Jun 2012 23:29:01 +1000\r
+Message-Id: <1340198947-29370-3-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.4.4\r
+In-Reply-To: <1340198947-29370-1-git-send-email-novalazy@gmail.com>\r
+References: <1340198947-29370-1-git-send-email-novalazy@gmail.com>\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, 20 Jun 2012 13:29:38 -0000\r
+\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+\r
+Add a --exclude=all option to notmuch search.\r
+---\r
+ notmuch-search.c | 8 ++++++--\r
+ 1 files changed, 6 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/notmuch-search.c b/notmuch-search.c\r
+index 3be296d..89b5bf9 100644\r
+--- a/notmuch-search.c\r
++++ b/notmuch-search.c\r
+@@ -420,6 +420,7 @@ enum {\r
+ EXCLUDE_TRUE,\r
+ EXCLUDE_FALSE,\r
+ EXCLUDE_FLAG,\r
++ EXCLUDE_ALL\r
+ };\r
+ \r
+ int\r
+@@ -461,6 +462,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ (notmuch_keyword_t []){ { "true", EXCLUDE_TRUE },\r
+ { "false", EXCLUDE_FALSE },\r
+ { "flag", EXCLUDE_FLAG },\r
++ { "all", EXCLUDE_ALL },\r
+ { 0, 0 } } },\r
+ { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },\r
+ { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0 },\r
+@@ -516,7 +518,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ exclude = EXCLUDE_FALSE;\r
+ }\r
+ \r
+- if (exclude == EXCLUDE_TRUE || exclude == EXCLUDE_FLAG) {\r
++ if (exclude != EXCLUDE_FALSE) {\r
+ const char **search_exclude_tags;\r
+ size_t search_exclude_tags_length;\r
+ \r
+@@ -525,7 +527,9 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
+ for (i = 0; i < search_exclude_tags_length; i++)\r
+ notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
+ if (exclude == EXCLUDE_FLAG)\r
+- notmuch_query_set_omit_excluded (query, FALSE);\r
++ notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FALSE);\r
++ if (exclude == EXCLUDE_ALL)\r
++ notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_ALL);\r
+ }\r
+ \r
+ switch (output) {\r
+-- \r
+1.7.4.4\r
+\r