From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id wMlGGw47vl8eEAAA0tVLHw (envelope-from ) for ; Wed, 25 Nov 2020 11:07:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kCEoFw47vl+jIwAA1q6Kng (envelope-from ) for ; Wed, 25 Nov 2020 11:07:58 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DDC3B9402A7 for ; Wed, 25 Nov 2020 11:07:55 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id E4E1F28CA4; Wed, 25 Nov 2020 06:07:48 -0500 (EST) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0762728C9E for ; Wed, 25 Nov 2020 06:07:46 -0500 (EST) Received: by fethera.tethera.net (Postfix, from userid 1001) id A19865FB05; Wed, 25 Nov 2020 06:07:43 -0500 (EST) Received: (nullmailer pid 545427 invoked by uid 1000); Wed, 25 Nov 2020 11:07:42 -0000 From: David Bremner To: Floris Bruynooghe , "Jorge P. de Morais Neto" , notmuch@notmuchmail.org Subject: Re: New Python bindings (notmuch2 module) fail to exclude tags In-Reply-To: <87y2iqpepu.fsf@powell.devork.be> References: <87r1oohvm0.fsf@disroot.org> <87zh3b99kb.fsf@powell.devork.be> <87h7pitm48.fsf@disroot.org> <87y2iqpepu.fsf@powell.devork.be> Date: Wed, 25 Nov 2020 07:07:42 -0400 Message-ID: <87sg8xlmo1.fsf@tethera.net> MIME-Version: 1.0 Message-ID-Hash: 7KVKWGZWQXBLQGTHHP2LA7YHZI5U5AP6 X-Message-ID-Hash: 7KVKWGZWQXBLQGTHHP2LA7YHZI5U5AP6 X-MailFrom: david@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Spam-Score: -1.01 X-TUID: bM5RQYRMDM+N Floris Bruynooghe writes: > > I have a database with 3 messages organised in 2 threads and the > following tags: > > msg1: all > +- msg3: all, spam > msg2: all > > I query '*', so all messages with exclude_tags=['spam']. Querying this > with various flags gives me: > > NOTMUCH_EXCLUDE_TRUE: 2 messages, what I expect > NOTMUCH_EXCLUDE_ALL: 2 messages, what I expect > NOTMUCH_EXCLUDE_FLAG: 2 messages, I expected 3 > NOTMUCH_EXCLUDE_FLASE: 2 messages, I expected 3 > > Did I misunderstand the docs? Are these results correct? It sounds a bit strange. Can you check against the results of "notmuch search --output=messages", with the corresponding flag? The numbers would make more sense if searching for threads rather than messages. d