--- /dev/null
+Return-Path: <eg@gaute.vetsj.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 40801431FC7\r
+ for <notmuch@notmuchmail.org>; Sun, 7 Dec 2014 06:28:52 -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 jqcZT9dFdj-f for <notmuch@notmuchmail.org>;\r
+ Sun, 7 Dec 2014 06:28:47 -0800 (PST)\r
+Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com\r
+ [74.125.82.41]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client\r
+ certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
+ 19E68431FC0 for <notmuch@notmuchmail.org>; Sun, 7 Dec 2014 06:28:42 -0800\r
+ (PST)\r
+Received: by mail-wg0-f41.google.com with SMTP id y19so4339609wgg.14\r
+ for <notmuch@notmuchmail.org>; Sun, 07 Dec 2014 06:28:40 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:date:from:subject:to:references:in-reply-to\r
+ :user-agent:message-id:mime-version:content-type\r
+ :content-transfer-encoding;\r
+ bh=gqbkvg1YMy84hdXxt0TIGCy9WSu7h0fN2w9eqckxmNw=;\r
+ b=K6nMgxsqm8o3CPHE7ueDkeU8QOAqtt6s40ORojRKdjwUwtd1/gf2mm/9kxNeYoZf6h\r
+ Phvp+Ue7p/kG1Abw692oigCEUSEpMzQoaw1Y+ycn+isjLLU6CquMN5fBhPtBgblshFak\r
+ PHFonzgtOQBpXvS8mRXfC7SKt7DilZkjReId7u3P+jdvPnURanWXYesTL2y19w5b7hHK\r
+ LoU7wR+iqI4S+wNQC0ZA/N9FKRErteWHKO/LPw61vCcTk0hGGLQy8IgUYWSZ50JEexv8\r
+ vI7Xl9j1jv62aCUSUN3LR+p/7qvWfdfRAHdOk+kORHWzHAtFWsFwM21UBmcbed/tt7o1\r
+ TpiQ==\r
+X-Gm-Message-State:\r
+ ALoCoQnBOqjhtgWlOhlM/orixDLQPR/wtybhaVlDUXlxnuHRSNGILZ8nwZ9YALgzFMmUr8EHnznR\r
+X-Received: by 10.194.83.42 with SMTP id n10mr37313111wjy.133.1417962520854;\r
+ Sun, 07 Dec 2014 06:28:40 -0800 (PST)\r
+Received: from localhost (216.89-20-249.enivest.net. [89.20.249.216])\r
+ by mx.google.com with ESMTPSA id\r
+ eu15sm5944242wid.18.2014.12.07.06.28.39 for <multiple recipients>\r
+ (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sun, 07 Dec 2014 06:28:40 -0800 (PST)\r
+Date: Sun, 07 Dec 2014 14:29:21 +0000\r
+From: Gaute Hope <eg@gaute.vetsj.com>\r
+Subject: Re: notmuch_query_add_tag_excluded and notmuch_query_search_threads\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+References: <1417905319-astroid-0-i86er7iwg5-10728@strange>\r
+ <87388rfzhw.fsf@maritornes.cs.unb.ca>\r
+ <1417958519-astroid-0-ydniq6pte2-8575@strange>\r
+ <87wq63ef9s.fsf@maritornes.cs.unb.ca>\r
+In-Reply-To: <87wq63ef9s.fsf@maritornes.cs.unb.ca>\r
+User-Agent: astroid/vv0.1-10-g39dd8180 (https://github.com/gauteh/astroid)\r
+Message-Id: <1417962498-astroid-0-zqj7j2s0ov-9575@strange>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8; format=flowed\r
+Content-Transfer-Encoding: quoted-printable\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, 07 Dec 2014 14:28:53 -0000\r
+\r
+Excerpts from David Bremner's message of December 7, 2014 14:54:\r
+> Gaute Hope <eg@gaute.vetsj.com> writes:\r
+>=20\r
+>>\r
+>> I also did an notmuch_query_count_threads (query) as illustrated\r
+>> above, this returns 0 and also results in the erroneous behavior\r
+>> below. Your code works as expected without the _count_threads() call.\r
+>=20\r
+> I think there's a documentation error; notmuch_query_count_threads is\r
+> destructive. As to why your's returns 0 that's still a mystery to me. I\r
+> get 84, which matches the output from "notmuch search".\r
+>=20\r
+\r
+Ok, that explains it. You are right - I mixed up, the count is correct.\r
+\r
+regards, gaute\r
+\r
+=\r