--- /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 BC90E431FBD\r
+ for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 21:08:53 -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 YcQywd4EptEl for <notmuch@notmuchmail.org>;\r
+ Sat, 25 Feb 2012 21:08:53 -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
+ 25C87431FAE for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 21:08:53 -0800\r
+ (PST)\r
+Received: by wgbdt12 with SMTP id dt12so2813759wgb.2\r
+ for <notmuch@notmuchmail.org>; Sat, 25 Feb 2012 21:08:52 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of markwalters1009@gmail.com designates\r
+ 10.180.78.6 as permitted sender) client-ip=10.180.78.6; \r
+Authentication-Results: mr.google.com; spf=pass (google.com: domain of\r
+ markwalters1009@gmail.com designates 10.180.78.6 as permitted\r
+ sender) smtp.mail=markwalters1009@gmail.com;\r
+ dkim=pass header.i=markwalters1009@gmail.com\r
+Received: from mr.google.com ([10.180.78.6])\r
+ by 10.180.78.6 with SMTP id x6mr8104461wiw.18.1330232932081 (num_hops =\r
+ 1); Sat, 25 Feb 2012 21:08:52 -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:in-reply-to:references;\r
+ bh=kTsI2ZMo+rBmhGz/LXusdK9NBBiE4ufayWBC1cKc9CY=;\r
+ b=YOJIfwEenysdCbHSAhuJ8b2TLQrFgsD/tUccJmlMwGyICmd5VMeESTXTOWw5pOXA1V\r
+ Rne+/QoslZ5cVPUPCerzMqfanqHQkhTxskrB00UjNblbHJJJ4rQOxPmLucbxUNmHj6dL\r
+ m1lDPqqv+t0VGrWrLjIEP+3mIRsDefm/qsubM=\r
+Received: by 10.180.78.6 with SMTP id x6mr1725934wiw.18.1330157156328;\r
+ Sat, 25 Feb 2012 00:05:56 -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
+ hb10sm20589357wib.10.2012.02.25.00.05.55 (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sat, 25 Feb 2012 00:05:55 -0800 (PST)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org,\r
+ Austin Clements <amdragon@MIT.EDU>\r
+Subject: [Patch v6 13/13] emacs: notmuch.el ignore excluded matches\r
+Date: Sat, 25 Feb 2012 08:06:44 +0000\r
+Message-Id: <1330157204-26094-14-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.2.3\r
+In-Reply-To: <1330157204-26094-1-git-send-email-markwalters1009@gmail.com>\r
+References: <1330157204-26094-1-git-send-email-markwalters1009@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: Sun, 26 Feb 2012 05:08:53 -0000\r
+\r
+This is a small change to make notmuch.el ignore excluded matches. In\r
+the future it could do something better like add a button for\r
+rerunning the search with the excludes (particularly if nothing\r
+matches with the excludes) or having them invisible and allowing the\r
+visibility to be toggled.\r
+\r
+It is a 1 or 2 line change except for indentation.\r
+---\r
+ emacs/notmuch.el | 22 ++++++++++++----------\r
+ 1 files changed, 12 insertions(+), 10 deletions(-)\r
+\r
+diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
+index 5b4f1c5..8b209cd 100644\r
+--- a/emacs/notmuch.el\r
++++ b/emacs/notmuch.el\r
+@@ -865,16 +865,18 @@ non-authors is found, assume that all of the authors match."\r
+ (goto-char (point-max))\r
+ (if (/= (match-beginning 1) line)\r
+ (insert (concat "Error: Unexpected output from notmuch search:\n" (substring string line (match-beginning 1)) "\n")))\r
+- (let ((beg (point)))\r
+- (notmuch-search-show-result date count authors\r
+- (notmuch-prettify-subject subject) tags)\r
+- (notmuch-search-color-line beg (point) tag-list)\r
+- (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
+- (put-text-property beg (point) 'notmuch-search-authors authors)\r
+- (put-text-property beg (point) 'notmuch-search-subject subject)\r
+- (when (string= thread-id notmuch-search-target-thread)\r
+- (set 'found-target beg)\r
+- (set 'notmuch-search-target-thread "found")))\r
++ ;; We currently just throw away excluded matches.\r
++ (unless (eq (aref count 1) ?0)\r
++ (let ((beg (point)))\r
++ (notmuch-search-show-result date count authors\r
++ (notmuch-prettify-subject subject) tags)\r
++ (notmuch-search-color-line beg (point) tag-list)\r
++ (put-text-property beg (point) 'notmuch-search-thread-id thread-id)\r
++ (put-text-property beg (point) 'notmuch-search-authors authors)\r
++ (put-text-property beg (point) 'notmuch-search-subject subject)\r
++ (when (string= thread-id notmuch-search-target-thread)\r
++ (set 'found-target beg)\r
++ (set 'notmuch-search-target-thread "found"))))\r
+ (set 'line (match-end 0)))\r
+ (set 'more nil)\r
+ (while (and (< line (length string)) (= (elt string line) ?\n))\r
+-- \r
+1.7.2.3\r
+\r