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 0FC986DE014D for ; Wed, 31 Aug 2016 05:52:41 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.53 X-Spam-Level: X-Spam-Status: No, score=-0.53 tagged_above=-999 required=5 tests=[AWL=0.290, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] 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 rfLWjlc6hxBm for ; Wed, 31 Aug 2016 05:52:40 -0700 (PDT) Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by arlo.cworth.org (Postfix) with ESMTPS id CBD6C6DE0130 for ; Wed, 31 Aug 2016 05:52:39 -0700 (PDT) Received: by mail-wm0-f46.google.com with SMTP id c133so31196953wmd.1 for ; Wed, 31 Aug 2016 05:52:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:references:in-reply-to:mime-version:date:message-id; bh=ARUV3sf91ivxL7hOA7PZSQ/fQ3h+KdtgzOr8so1BbXc=; b=wSmWMvOpg7dcLq/9agDaVN69ZVMvS7Dtnk7vfGrb7LcqWIoFT8hDguTb1q4yeDx8M1 5aTDSW11G1/BbrTP5WEEvbrGPr2NcSbqBlXJXxi2YLiXEFsybJnXkzAbM9TnYxaLFKIo 84ywIc5y+zsnsX5aHCwNlV6026Svf+Zy3zhE3GXcDBWKICSkusXE1L/FbvlaBukP40Vq zTzkQdQnhq007qsyWBhAA9zxksIIacDXM/AEft0uTh+1B0gE+8ZaDdBBtK3cwzOd1xD4 dmzr0yjZM38zFQRNrb+B4Lz8bK4sjidV/r8XZgPRAE8Mrf2k5qFvK+6ncACsG+dmNmlD /DYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:subject:to:references:in-reply-to :mime-version:date:message-id; bh=ARUV3sf91ivxL7hOA7PZSQ/fQ3h+KdtgzOr8so1BbXc=; b=hngfEwzXBZsLKXmhXklLBCg+PXphMsmy1YessZ0urRBQM+s+VCnMK0g+4RkhMdLC2y OmG9YT9zPsVBAEvp4hYElH5nB8yUaJo2PcYvtHhz1qwudpA/LObSeSSL8AxzkQ7MzXWd L7t5VPgSU54beIJvyEPi1WwdYUxa3s3Frx/KZLje3DV8H+53eIz8T2B3Jf9ezMdlgkch 3Kng7z3ZVANAbfWqsmIac1jJkroewtNeUFHowmK5EU/NRicARgN9m3pCKUG4UCNOjNAL z0sP2geeIb0Tyo3aP0cNe78jjsPJwYMij6wfjV5qWoabCjbJU3n+eu12ARKmjHCRIzVh 66wQ== X-Gm-Message-State: AE9vXwP5kXUxabovmmtWM5OW5jt8lQoFQIxw94ggiHV2gigFNnsuNamehh+z3cTzw976Bw== X-Received: by 10.194.107.130 with SMTP id hc2mr8749916wjb.7.1472647958238; Wed, 31 Aug 2016 05:52:38 -0700 (PDT) Received: from localhost (p579BAD04.dip0.t-ipconnect.de. [87.155.173.4]) by smtp.gmail.com with ESMTPSA id o5sm8842209wmg.16.2016.08.31.05.52.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 31 Aug 2016 05:52:37 -0700 (PDT) From: Franz Fellner Subject: Re: Bug: counting messages twice after excluding tags yields different results To: David Bremner , Lucas Hoffmann , notmuch@notmuchmail.org References: <147263183913.27784.12274024193186585889@mbp> <1.472.635.278-ner-3.934@TP_L520> <147264220228.31988.2941265478027864869@mbp> <87vayhku3f.fsf@zancas.localnet> In-Reply-To: <87vayhku3f.fsf@zancas.localnet> MIME-Version: 1.0 Date: Wed, 31 Aug 2016 12:56:07 +0000 Message-Id: <1.472.648.167-ner-3.768@TP_L520> Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Wed, 31 Aug 2016 12:52:41 -0000 On Wed, 31 Aug 2016 09:20:52 -0300, David Bremner wrote: > Lucas Hoffmann writes: > > > Thank you Franz, sadly your reply did not convince me: > > > > Quoting Franz Fellner (2016-08-31 11:21:18) > >> Your problem: the example sucks ;) > > > > No, I must object :( > > > >> If the query searches for a tag you also have in exclude_tags (in your > >> case: spam) the exclude gets ignored. > > > > Is that documented? Because it is not what I would expect. > > Yes, it is documented in notmuch-config(1) And for "destructiveness" see the implementation in lib/query.cc _notmuch_exclude_tags: It replaces every matching tag in query_string and exclude_tags with an empty string "" in the exclude terms. This most likely results in which can be seen as a bug, if you want; removing would be better but also more expensive. For a quick test run your test program with different queries/exclude_tags with NOTMUCH_DEBUG_QUERY (man notmuch) set to a non-empty value and look what happens ;)