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 D600D431FAF for ; Mon, 28 May 2012 11:54:35 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 9Ec93RCX2wG8 for ; Mon, 28 May 2012 11:54:35 -0700 (PDT) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 3D4AF431FAE for ; Mon, 28 May 2012 11:54:35 -0700 (PDT) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1SZ55J-0001bP-Fz; Mon, 28 May 2012 19:54:29 +0100 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1SZ55J-0004f9-7B; Mon, 28 May 2012 19:54:29 +0100 From: Mark Walters To: Peter Wang , notmuch@notmuchmail.org Subject: Re: search summary and exclusions In-Reply-To: <20120529000012.GF2331@hili.localdomain> References: <20120529000012.GF2331@hili.localdomain> User-Agent: Notmuch/0.13+55~g992aa73 (http://notmuchmail.org) Emacs/23.3.1 (x86_64-pc-linux-gnu) Date: Mon, 28 May 2012 19:54:31 +0100 Message-ID: <871um4nnko.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 94.192.233.223 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: 61e92b8b684f7dc1e3d9fe47d79834fe (of first 20000 bytes) X-SpamAssassin-Score: -1.8 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay * domain * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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: Mon, 28 May 2012 18:54:36 -0000 Hi On Mon, 28 May 2012, Peter Wang wrote: > Hi, > > Exclusions don't work the way I expected with the search command and > --output=summary. I would like messages with excluded tags to be > treated as if they don't exist at all, but currently: > > * excluded messages are counted towards the "total" > * excluded tags are included in the "tags" set > > Are these deliberate? Especially the second point seems to conflict > with search --output=tags, which doesn't show excluded tags. The general idea is that commands that deciding whether something matches the search checks the excludes but constructing a thread does not. The difference in tags when outputting tags and summary is that the former outputs tags of *messages* matching the query (so respects the excludes) whereas summary outputs the tags of all messages in threads matching the query (so does not respect the excludes) but see below for more precise explanations. notmuch search --output=tags The tags from messages which match the search and are not excluded are returned. notmuch search --output=threads returns all threads containing a message which matches the search and is not excluded notmuch search --output=summary returns the summary output of all these threads. The summary output includes all tags of all messages (whether excluded or not) of the thread and the count is the number of messages (including excluded messages) of the thread. This seems consistent with notmuch show --entire-thread which returns all messages (whether excluded or not) of all these threads. Best wishes Mark