--- /dev/null
+Return-Path: <imain@redhat.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 68D8C431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 11:12:32 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_NONE=-0.0001] 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 XJ+8D88v1Zcf for <notmuch@notmuchmail.org>;\r
+ Mon, 20 Oct 2014 11:12:25 -0700 (PDT)\r
+Received: from cmta14.telus.net (cmta14.telus.net [209.171.16.87])\r
+ by olra.theworths.org (Postfix) with ESMTP id 30FAB431FAE\r
+ for <notmuch@notmuchmail.org>; Mon, 20 Oct 2014 11:12:25 -0700 (PDT)\r
+Received: from ovo.mains.priv ([207.102.88.62]) by cmta14.telus.net with TELUS\r
+ id 5WCQ1p00B1LiWEf01WCQvp; Mon, 20 Oct 2014 12:12:24 -0600\r
+X-Authority-Analysis: v=2.0 cv=YvLRsfkX c=1 sm=2\r
+ a=EcQDfIwDZEqJA1f7rVUV8Q==:17 a=K_0WnIvp2iAA:10 a=IkcTkHD0fZMA:10\r
+ a=20KFwNOVAAAA:8 a=pGLkceISAAAA:8 a=7343-z1_AAAA:8\r
+ a=E2VBG8G2KAZyGhUcUgUA:9\r
+ a=QEXdDO2ut3YA:10 a=MSl-tDqOz04A:10 a=0c-eHkXYtrgA:10\r
+ a=DT_JQ7Kj-ggUwJRE:21\r
+ a=6UbEzHd2lRgpVt0V:21 a=EcQDfIwDZEqJA1f7rVUV8Q==:117\r
+X-Telus-Outbound-IP: 207.102.88.62\r
+Received: from ovo.mains.priv (localhost.localdomain [127.0.0.1])\r
+ by ovo.mains.priv (8.14.8/8.14.8) with ESMTP id s9KICLS1003401;\r
+ Mon, 20 Oct 2014 11:12:23 -0700\r
+Received: (from imain@localhost)\r
+ by ovo.mains.priv (8.14.8/8.14.8/Submit) id s9KICKDV003400;\r
+ Mon, 20 Oct 2014 11:12:20 -0700\r
+X-Authentication-Warning: ovo.mains.priv: imain set sender to imain@redhat.com\r
+ using -f\r
+Date: Mon, 20 Oct 2014 11:12:20 -0700\r
+From: Ian Main <imain@redhat.com>\r
+To: Franz Fellner <alpine.art.de@gmail.com>\r
+Message-ID: <5445508493932_ce1af5e886b@ovo.mains.priv.notmuch>\r
+In-Reply-To: <20141017180750.GE20696@TP_L520.localdomain>\r
+References: <20141017180750.GE20696@TP_L520.localdomain>\r
+Subject: RE: [PATCH] VIM: Respect exclude_tags specified in .notmuch-config\r
+Mime-Version: 1.0\r
+Content-Type: text/plain;\r
+ charset=utf-8\r
+Content-Transfer-Encoding: 7bit\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: Mon, 20 Oct 2014 18:12:32 -0000\r
+\r
+\r
+Thanks Franz!\r
+\r
+So this works well in the main searches by not showing anything I have marked\r
+as 'spam'. However if I force a search for tag:spam and then try to view any\r
+of the messages presented they will not show up because of the way we display\r
+the email.. :-/\r
+\r
+I'm not sure what is the best way to fix this..\r
+\r
+ Ian\r
+\r
+Franz Fellner wrote:\r
+> commit 558719b9ea9c218117c448cf4c7bd671de14d968\r
+> Author: Franz Fellner <alpine.art.de@gmail.com>\r
+> Date: Fri Oct 17 17:53:58 2014 +0200\r
+> \r
+> Exclude tags specified by\r
+> notmuch config get search.exclude_tags\r
+> \r
+> diff --git a/vim/notmuch.vim b/vim/notmuch.vim\r
+> index 5c86fcd..b8d11fe 100644\r
+> --- a/vim/notmuch.vim\r
+> +++ b/vim/notmuch.vim\r
+> @@ -647,6 +647,7 @@ ruby << EOF\r
+> $db_name = nil\r
+> $all_emails = []\r
+> $email = $email_name = $email_address = nil\r
+> + $exclude_tags = []\r
+> $searches = []\r
+> $threads = []\r
+> $messages = []\r
+> @@ -672,6 +673,8 @@ ruby << EOF\r
+> # Add the primary to this too as we use it for checking\r
+> # addresses when doing a reply\r
+> $all_emails.unshift($email_address)\r
+> + ignore_tags = get_config_item('search.exclude_tags')\r
+> + $exclude_tags = ignore_tags.split("\n")\r
+> end\r
+> \r
+> def vim_puts(s)\r
+> @@ -924,6 +927,9 @@ ruby << EOF\r
+> \r
+> def query(*args)\r
+> q = @db.query(*args)\r
+> + $exclude_tags.each { |t|\r
+> + q.add_tag_exclude(t)\r
+> + }\r
+> @queries << q\r
+> q\r
+> end\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r
+\r
+\r