[Patch v3 3/3] doc: postprocess notmuch.3
[notmuch-archives.git] / cc / e182584b31e4707c80fc35273e8b69916548ff
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 B2E2B431FAE\r
6         for <notmuch@notmuchmail.org>; Fri,  2 Mar 2012 12:30:07 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.401\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.401 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         FREEMAIL_REPLY=2.499, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3]\r
14         autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id SLhHZzEE-P5v for <notmuch@notmuchmail.org>;\r
18         Fri,  2 Mar 2012 12:30:07 -0800 (PST)\r
19 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
20         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id A8F84431E84\r
23         for <notmuch@notmuchmail.org>; Fri,  2 Mar 2012 12:30:05 -0800 (PST)\r
24 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
25         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
26         (envelope-from <m.walters@qmul.ac.uk>)\r
27         id 1S3Z73-0003dc-5k; Fri, 02 Mar 2012 20:30:01 +0000\r
28 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
29         helo=localhost)\r
30         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
31         (envelope-from <m.walters@qmul.ac.uk>)\r
32         id 1S3Z72-0001tN-Kl; Fri, 02 Mar 2012 20:30:00 +0000\r
33 From: Mark Walters <markwalters1009@gmail.com>\r
34 To: notmuch@notmuchmail.org,\r
35  Jameson Graef Rollins <jrollins@finestructure.net>\r
36 Subject: Re: [Patch v7 00/13] Add NOTMUCH_MESSAGE_FLAG_EXCLUDED flag\r
37 In-Reply-To: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>\r
38 References: <1330641045-27416-1-git-send-email-markwalters1009@gmail.com>\r
39 User-Agent: Notmuch/0.11.1+277~g6441649 (http://notmuchmail.org) Emacs/23.2.1\r
40         (i486-pc-linux-gnu)\r
41 Date: Fri, 02 Mar 2012 20:31:47 +0000\r
42 Message-ID: <871upawxqk.fsf@qmul.ac.uk>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 X-Sender-Host-Address: 94.192.233.223\r
46 X-QM-SPAM-Info: Sender has good ham record.  :)\r
47 X-QM-Body-MD5: c151b21dddc29410e89bc96fd6679986 (of first 20000 bytes)\r
48 X-SpamAssassin-Score: -1.2\r
49 X-SpamAssassin-SpamBar: -\r
50 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
51         determine if it is\r
52         spam. We require at least 5.0 points to mark a message as spam.\r
53         This message scored -1.2 points.\r
54         Summary of the scoring: \r
55         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
56         *      medium trust\r
57         *      [138.37.6.40 listed in list.dnswl.org]\r
58         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
59         provider *      (markwalters1009[at]gmail.com)\r
60         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
61         *      domain\r
62         *  1.0 FREEMAIL_REPLY From and body contain different freemails\r
63         *  0.1 AWL AWL: From: address is in the auto white-list\r
64 X-QM-Scan-Virus: ClamAV says the message is clean\r
65 X-BeenThere: notmuch@notmuchmail.org\r
66 X-Mailman-Version: 2.1.13\r
67 Precedence: list\r
68 List-Id: "Use and development of the notmuch mail system."\r
69         <notmuch.notmuchmail.org>\r
70 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
71         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
72 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
73 List-Post: <mailto:notmuch@notmuchmail.org>\r
74 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
75 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
76         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
77 X-List-Received-Date: Fri, 02 Mar 2012 20:30:07 -0000\r
78 \r
79 On Thu,  1 Mar 2012 22:30:32 +0000, Mark Walters <markwalters1009@gmail.com> wrote:\r
80 > This is essentially the same as\r
81 > id:"1330157204-26094-1-git-send-email-markwalters1009@gmail.com" but\r
82 > has been rebased against master. The changes are to patch 12/13 for\r
83 > notmuch-show.el (which was posted as a followup to the previous series)\r
84 > and to the tests (patch 9/13) which changed in Austin's JSON show\r
85 > rewrite.\r
86 \r
87 This series has some significant speed issues in some use cases. It also\r
88 defaults to returning excluded messages on the command line which is\r
89 wrong.\r
90 \r
91 This adds an option --include-excluded to tell search to return all\r
92 threads (excluded threads will show up as [0/n] in the match column) but\r
93 otherwise (default) omits them.\r
94 \r
95 It is not clear whether there is sufficient utility to make it\r
96 worthwhile keeping this option but it should make the series usable\r
97 while that is worked out.\r
98 \r
99 I will try to check old emails and work out what the uses were/corner\r
100 cases fixed by the series and post that later. It may be the case that \r
101 the show part of this series is worth keeping but not the search part.\r
102 \r
103 Best wishes \r
104 \r
105 Mark\r
106 \r
107 \r
108 --->8--- \r
109 \r
110 >From 64416494f4eceb9f0afbdcb973fd7a82e1e2fcf5 Mon Sep 17 00:00:00 2001\r
111 From: Mark Walters <markwalters1009@gmail.com>\r
112 Date: Fri, 2 Mar 2012 20:19:01 +0000\r
113 Subject: [PATCH] cli: make notmuch-search.c default to omitting excluded messages\r
114 \r
115 This is a temporary measure to make notmuch-search.c default to\r
116 omitting threads only matching in excluded messages entirely. This is\r
117 intended as a temporary measure while we decide whether to revert this\r
118 part of the exclude_flag series entirely.\r
119 ---\r
120  notmuch-search.c |    4 ++++\r
121  1 files changed, 4 insertions(+), 0 deletions(-)\r
122 \r
123 diff --git a/notmuch-search.c b/notmuch-search.c\r
124 index f6061e4..3d73bd5 100644\r
125 --- a/notmuch-search.c\r
126 +++ b/notmuch-search.c\r
127 @@ -436,6 +436,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
128      int offset = 0;\r
129      int limit = -1; /* unlimited */\r
130      notmuch_bool_t no_exclude = FALSE;\r
131 +    notmuch_bool_t include_excluded = FALSE;\r
132      unsigned int i;\r
133  \r
134      enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }\r
135 @@ -458,6 +459,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
136                                   { "tags", OUTPUT_TAGS },\r
137                                   { 0, 0 } } },\r
138         { NOTMUCH_OPT_BOOLEAN, &no_exclude, "no-exclude", 'd', 0 },\r
139 +       { NOTMUCH_OPT_BOOLEAN, &include_excluded, "include-excluded", 'd', 0 },\r
140         { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },\r
141         { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0  },\r
142         { 0, 0, 0, 0, 0 }\r
143 @@ -514,6 +516,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
144         for (i = 0; i < search_exclude_tags_length; i++)\r
145             notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
146      }\r
147 +    if (!include_excluded)\r
148 +       notmuch_query_set_omit_excluded_messages (query, TRUE);\r
149  \r
150      switch (output) {\r
151      default:\r
152 -- \r
153 1.7.2.3\r
154 \r