Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 29110431FC7 for ; Sun, 7 Dec 2014 05:55:08 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lww3olO3AUKk for ; Sun, 7 Dec 2014 05:55:04 -0800 (PST) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 31305431FC0 for ; Sun, 7 Dec 2014 05:55:04 -0800 (PST) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1XxcIe-0002E1-PM; Sun, 07 Dec 2014 09:55:00 -0400 Received: (nullmailer pid 18665 invoked by uid 1000); Sun, 07 Dec 2014 13:54:55 -0000 From: David Bremner To: Gaute Hope , notmuch@notmuchmail.org Subject: Re: notmuch_query_add_tag_excluded and notmuch_query_search_threads In-Reply-To: <1417958519-astroid-0-ydniq6pte2-8575@strange> References: <1417905319-astroid-0-i86er7iwg5-10728@strange> <87388rfzhw.fsf@maritornes.cs.unb.ca> <1417958519-astroid-0-ydniq6pte2-8575@strange> User-Agent: Notmuch/0.19+2~g32855b9 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Sun, 07 Dec 2014 14:54:55 +0100 Message-ID: <87wq63ef9s.fsf@maritornes.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2014 13:55:08 -0000 Gaute Hope writes: > > I also did an notmuch_query_count_threads (query) as illustrated > above, this returns 0 and also results in the erroneous behavior > below. Your code works as expected without the _count_threads() call. I think there's a documentation error; notmuch_query_count_threads is destructive. As to why your's returns 0 that's still a mystery to me. I get 84, which matches the output from "notmuch search".