[PATCH v2 12/14] lib: Support empty header values in database
[notmuch-archives.git] / f9 / 0ecbef6925e6c8e1842623867b964938a185fc
1 Return-Path: <m.walters@qmul.ac.uk>\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 D600D431FAF\r
6         for <notmuch@notmuchmail.org>; Mon, 28 May 2012 11:54:35 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 9Ec93RCX2wG8 for <notmuch@notmuchmail.org>;\r
17         Mon, 28 May 2012 11:54:35 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 3D4AF431FAE\r
22         for <notmuch@notmuchmail.org>; Mon, 28 May 2012 11:54:35 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1SZ55J-0001bP-Fz; Mon, 28 May 2012 19:54:29 +0100\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
28         helo=localhost)\r
29         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
30         (envelope-from <m.walters@qmul.ac.uk>)\r
31         id 1SZ55J-0004f9-7B; Mon, 28 May 2012 19:54:29 +0100\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: Peter Wang <novalazy@gmail.com>, notmuch@notmuchmail.org\r
34 Subject: Re: search summary and exclusions\r
35 In-Reply-To: <20120529000012.GF2331@hili.localdomain>\r
36 References: <20120529000012.GF2331@hili.localdomain>\r
37 User-Agent: Notmuch/0.13+55~g992aa73 (http://notmuchmail.org) Emacs/23.3.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Mon, 28 May 2012 19:54:31 +0100\r
40 Message-ID: <871um4nnko.fsf@qmul.ac.uk>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=us-ascii\r
43 X-Sender-Host-Address: 94.192.233.223\r
44 X-QM-SPAM-Info: Sender has good ham record.  :)\r
45 X-QM-Body-MD5: 61e92b8b684f7dc1e3d9fe47d79834fe (of first 20000 bytes)\r
46 X-SpamAssassin-Score: -1.8\r
47 X-SpamAssassin-SpamBar: -\r
48 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
49         determine if it is\r
50         spam. We require at least 5.0 points to mark a message as spam.\r
51         This message scored -1.8 points.\r
52         Summary of the scoring: \r
53         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
54         *      medium trust\r
55         *      [138.37.6.40 listed in list.dnswl.org]\r
56         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
57         provider *      (markwalters1009[at]gmail.com)\r
58         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
59         *      domain\r
60         *  0.5 AWL AWL: From: address is in the auto white-list\r
61 X-QM-Scan-Virus: ClamAV says the message is clean\r
62 X-BeenThere: notmuch@notmuchmail.org\r
63 X-Mailman-Version: 2.1.13\r
64 Precedence: list\r
65 List-Id: "Use and development of the notmuch mail system."\r
66         <notmuch.notmuchmail.org>\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
70 List-Post: <mailto:notmuch@notmuchmail.org>\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
74 X-List-Received-Date: Mon, 28 May 2012 18:54:36 -0000\r
75 \r
76 \r
77 Hi\r
78 \r
79 On Mon, 28 May 2012, Peter Wang <novalazy@gmail.com> wrote:\r
80 > Hi,\r
81 >\r
82 > Exclusions don't work the way I expected with the search command and\r
83 > --output=summary.  I would like messages with excluded tags to be\r
84 > treated as if they don't exist at all, but currently:\r
85 >\r
86 >   * excluded messages are counted towards the "total"\r
87 >   * excluded tags are included in the "tags" set\r
88 >\r
89 > Are these deliberate?  Especially the second point seems to conflict\r
90 > with search --output=tags, which doesn't show excluded tags.\r
91 \r
92 The general idea is that commands that deciding whether something\r
93 matches the search checks the excludes but constructing a thread does\r
94 not. The difference in tags when outputting tags and summary is that the\r
95 former outputs tags of *messages* matching the query (so respects the\r
96 excludes) whereas summary outputs the tags of all messages in threads\r
97 matching the query (so does not respect the excludes) but see below for\r
98 more precise explanations.\r
99 \r
100 notmuch search --output=tags <search>\r
101 \r
102 The tags from messages which match the search and are not excluded are\r
103 returned.\r
104 \r
105 notmuch search --output=threads <search>\r
106 \r
107 returns all threads containing a message which matches the search and is\r
108 not excluded\r
109 \r
110 notmuch search --output=summary <search>\r
111 \r
112 returns the summary output of all these threads. The summary output\r
113 includes all tags of all messages (whether excluded or not) of the\r
114 thread and the count is the number of messages (including excluded\r
115 messages) of the thread.\r
116 \r
117 This seems consistent with\r
118 \r
119 notmuch show --entire-thread <search>\r
120 \r
121 which returns all messages (whether excluded or not) of all these\r
122 threads.\r
123 \r
124 Best wishes\r
125 \r
126 Mark\r