1 Return-Path: <david@tethera.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 15750431FCF
\r
6 for <notmuch@notmuchmail.org>; Sun, 7 Dec 2014 09:41:33 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id Clc6iL82YTgL for <notmuch@notmuchmail.org>;
\r
16 Sun, 7 Dec 2014 09:41:29 -0800 (PST)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 71A31431FC0
\r
21 for <notmuch@notmuchmail.org>; Sun, 7 Dec 2014 09:41:29 -0800 (PST)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <david@tethera.net>)
\r
24 id 1Xxfpi-00032K-JV; Sun, 07 Dec 2014 13:41:22 -0400
\r
25 Received: (nullmailer pid 2029 invoked by uid 1000); Sun, 07 Dec 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: Re: notmuch_query_add_tag_excluded and notmuch_query_search_threads
\r
30 In-Reply-To: <1417962498-astroid-0-zqj7j2s0ov-9575@strange>
\r
31 References: <1417905319-astroid-0-i86er7iwg5-10728@strange>
\r
32 <87388rfzhw.fsf@maritornes.cs.unb.ca>
\r
33 <1417958519-astroid-0-ydniq6pte2-8575@strange>
\r
34 <87wq63ef9s.fsf@maritornes.cs.unb.ca>
\r
35 <1417962498-astroid-0-zqj7j2s0ov-9575@strange>
\r
36 User-Agent: Notmuch/0.19+2~g32855b9 (http://notmuchmail.org) Emacs/24.4.1
\r
37 (x86_64-pc-linux-gnu)
\r
38 Date: Sun, 07 Dec 2014 18:41:17 +0100
\r
39 Message-ID: <87r3wbe4si.fsf@maritornes.cs.unb.ca>
\r
41 Content-Type: text/plain; charset=utf-8
\r
42 Content-Transfer-Encoding: quoted-printable
\r
43 X-BeenThere: notmuch@notmuchmail.org
\r
44 X-Mailman-Version: 2.1.13
\r
46 List-Id: "Use and development of the notmuch mail system."
\r
47 <notmuch.notmuchmail.org>
\r
48 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
50 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
51 List-Post: <mailto:notmuch@notmuchmail.org>
\r
52 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
53 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
54 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
55 X-List-Received-Date: Sun, 07 Dec 2014 17:41:33 -0000
\r
57 Gaute Hope <eg@gaute.vetsj.com> writes:
\r
60 > Ok, that explains it. You are right - I mixed up, the count is correct.
\r
64 At the end of this message is a simpler example, that I think
\r
65 demonstrates a bug. At the very list it's not very nice that the
\r
66 destructiveness only shows up when excludes are involved.
\r
68 Here is the output; note the second exclude query!
\r
71 | =E2=95=AD=E2=94=80 maritornes:~/tmp=20
\r
72 | =E2=95=B0=E2=94=80% NOTMUCH_DEBUG_QUERY=3D1 ./a.out
\r
78 | Xapian::Query((Tmail AND 0 * Kmuted))
\r
81 | Xapian::Query(<alldocuments>)
\r
83 | Xapian::Query(((Tmail AND 0 * Kmuted) AND_NOT <alldocuments>))
\r
89 #include <notmuch.h>
\r
93 int main(int argc, char **argv){
\r
95 notmuch_database_t *nm_db;
\r
96 notmuch_query_t *query;
\r
98 if (notmuch_database_open ("/home/bremner/Maildir/",
\r
99 NOTMUCH_DATABASE_MODE_READ_ONLY, &nm_db))
\r
102 query =3D notmuch_query_create (nm_db, "tag:muted");
\r
103 notmuch_query_add_tag_exclude (query, "muted");
\r
104 notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_TRUE);
\r
106 printf("ret1=3D%d\n", notmuch_query_count_threads (query));
\r
107 printf("ret2=3D%d\n", notmuch_query_count_threads (query));
\r