From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6AD936DE4E26 for ; Sun, 11 Mar 2018 06:19:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[AWL=0.011, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CeOyzLOQo6Fq for ; Sun, 11 Mar 2018 06:19:48 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 3E7146DE4E20 for ; Sun, 11 Mar 2018 06:19:48 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1ev0t5-0007JG-Hb; Sun, 11 Mar 2018 09:19:43 -0400 Received: (nullmailer pid 8960 invoked by uid 1000); Sun, 11 Mar 2018 13:19:41 -0000 From: David Bremner To: Justus Winter , notmuch@notmuchmail.org Subject: Re: notmuch_query_add_tag_exclude bug In-Reply-To: <87woysuofl.fsf@thinkbox.jade-hamburg.de> References: <87woysuofl.fsf@thinkbox.jade-hamburg.de> Date: Sun, 11 Mar 2018 09:19:41 -0400 Message-ID: <87h8pm6976.fsf@tethera.net> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.26 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, 11 Mar 2018 13:19:49 -0000 Justus Winter writes: > Hi :) > > so I found a weird bug with notmuch_query_add_tag_exclude. Apparently, > when I exclude 'spam', and search for 'spam', I still get results, but > if I exclude 'spam', and search for 'is_a_spam', I get no results, even > though there are mails tagged with that tag. > I'm not sure I follow you you. Can you try with export NOTMUCH_DEBUG_QUERY=yes and see what the query terms are? The latter actually sounds legit assuming - the excluded messages are tagged spam - the query parser is not breaking is_a_spam up, but treating it as one term.