1 Return-Path: <amdragon@mit.edu>
\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 08F05416284
\r
6 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:03:43 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id vJoUmxF9ZcLI for <notmuch@notmuchmail.org>;
\r
16 Fri, 24 Feb 2012 15:03:42 -0800 (PST)
\r
17 Received: from dmz-mailsec-scanner-2.mit.edu (DMZ-MAILSEC-SCANNER-2.MIT.EDU
\r
19 by olra.theworths.org (Postfix) with ESMTP id 4F0B2414786
\r
20 for <notmuch@notmuchmail.org>; Fri, 24 Feb 2012 15:03:42 -0800 (PST)
\r
21 X-AuditID: 1209190d-b7fbf6d0000008ba-5c-4f48174dd49f
\r
22 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35])
\r
23 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id 61.4B.02234.D47184F4; Fri, 24 Feb 2012 18:03:41 -0500 (EST)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id q1ON3fXv030165;
\r
27 Fri, 24 Feb 2012 18:03:41 -0500
\r
28 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])
\r
29 (authenticated bits=0)
\r
30 (User authenticated as amdragon@ATHENA.MIT.EDU)
\r
31 by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q1ON3dqW020535
\r
32 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);
\r
33 Fri, 24 Feb 2012 18:03:40 -0500 (EST)
\r
34 Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)
\r
35 (envelope-from <amdragon@mit.edu>)
\r
36 id 1S14At-0000dr-4E; Fri, 24 Feb 2012 18:03:39 -0500
\r
37 Date: Fri, 24 Feb 2012 18:03:39 -0500
\r
38 From: Austin Clements <amdragon@MIT.EDU>
\r
39 To: Mark Walters <markwalters1009@gmail.com>
\r
40 Subject: Re: [RFC PATCH v5 01/11] cli: add --no-exclude option to count and
\r
42 Message-ID: <20120224230339.GE30513@mit.edu>
\r
43 References: <1329296619-7463-1-git-send-email-markwalters1009@gmail.com>
\r
44 <1329296619-7463-2-git-send-email-markwalters1009@gmail.com>
\r
46 Content-Type: text/plain; charset=us-ascii
\r
47 Content-Disposition: inline
\r
48 In-Reply-To: <1329296619-7463-2-git-send-email-markwalters1009@gmail.com>
\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)
\r
50 X-Brightmail-Tracker:
\r
51 H4sIAAAAAAAAA+NgFmpileLIzCtJLcpLzFFi42IR4hRV1vUV9/A32NluYrF6Lo/F9ZszmR2Y
\r
52 PHbOusvu8WzVLeYApigum5TUnMyy1CJ9uwSujMPLlrEVfJCpePHwOmsD406xLkZODgkBE4m+
\r
53 J7dZIWwxiQv31rN1MXJxCAnsY5Q4M2UtK4SzgVFiwuZnLCBVQgInmSRO7s2HSCxhlJg18QF7
\r
54 FyMHB4uAqsTHBzIgNWwCGhLb9i9nBLFFBHQkbh9awA5iMwtIS3z73cwEYgsLhEo8mPYDLM4L
\r
55 VLOnvZMZYmY7o8S26TNYIBKCEidnPmGBaNaSuPHvJRPILpBBy/9xgIQ5BTwlbrf/ANslKqAi
\r
56 MeXkNrYJjEKzkHTPQtI9C6F7ASPzKkbZlNwq3dzEzJzi1GTd4uTEvLzUIl0jvdzMEr3UlNJN
\r
57 jOCgluTdwfjuoNIhRgEORiUeXuYt7v5CrIllxZW5hxglOZiURHmXi3n4C/El5adUZiQWZ8QX
\r
58 leakFh9ilOBgVhLhtWMDyvGmJFZWpRblw6SkOViUxHlVtd75CQmkJ5akZqemFqQWwWRlODiU
\r
59 JHjXgwwVLEpNT61Iy8wpQUgzcXCCDOcBGn4WpIa3uCAxtzgzHSJ/ilFRSpy3HSQhAJLIKM2D
\r
60 64UlnVeM4kCvCPMuA6niASYsuO5XQIOZgAbb/3UFGVySiJCSamCccu+aYr6zonHoDc/bf5eu
\r
61 iDboldu4fGrw1p77334xNgWrOgpWXE5YVp1csH5TB2NXzM+nrBK+p5NK13HqSURPKmU5oHF6
\r
62 5fwfy/18hO3k9EJ+LT82sf1nRISr1c5PhnkZv20OsgWpXs5mTJCrXXj/M6eGvFZls9pc/smp
\r
63 V4NyclN+bZnzyEyJpTgj0VCLuag4EQAne2QdFQMAAA==
\r
64 Cc: notmuch@notmuchmail.org
\r
65 X-BeenThere: notmuch@notmuchmail.org
\r
66 X-Mailman-Version: 2.1.13
\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, 24 Feb 2012 23:03:43 -0000
\r
79 Quoth Mark Walters on Feb 15 at 9:03 am:
\r
80 > This option turns off the exclusion so all matching messages are
\r
81 > returned. We do not need to add this to notmuch-show as that does not
\r
84 > notmuch-count.c | 17 +++++++++++------
\r
85 > notmuch-search.c | 17 +++++++++++------
\r
86 > 2 files changed, 22 insertions(+), 12 deletions(-)
\r
88 > diff --git a/notmuch-count.c b/notmuch-count.c
\r
89 > index 63459fb..5364507 100644
\r
90 > --- a/notmuch-count.c
\r
91 > +++ b/notmuch-count.c
\r
92 > @@ -35,8 +35,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
95 > int output = OUTPUT_MESSAGES;
\r
96 > - const char **search_exclude_tags;
\r
97 > - size_t search_exclude_tags_length;
\r
98 > + notmuch_bool_t no_exclude = FALSE;
\r
101 > notmuch_opt_desc_t options[] = {
\r
102 > @@ -44,6 +43,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
103 > (notmuch_keyword_t []){ { "threads", OUTPUT_THREADS },
\r
104 > { "messages", OUTPUT_MESSAGES },
\r
106 > + { NOTMUCH_OPT_BOOLEAN, &no_exclude, "no-exclude", 'd', 0 },
\r
107 > { 0, 0, 0, 0, 0 }
\r
110 > @@ -78,10 +78,15 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
114 > - search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
115 > - (config, &search_exclude_tags_length);
\r
116 > - for (i = 0; i < search_exclude_tags_length; i++)
\r
117 > - notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
118 > + if (!no_exclude) {
\r
119 > + const char **search_exclude_tags;
\r
120 > + size_t search_exclude_tags_length;
\r
122 > + search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
123 > + (config, &search_exclude_tags_length);
\r
124 > + for (i = 0; i < search_exclude_tags_length; i++)
\r
125 > + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
128 > switch (output) {
\r
129 > case OUTPUT_MESSAGES:
\r
130 > diff --git a/notmuch-search.c b/notmuch-search.c
\r
131 > index d504051..43ec90b 100644
\r
132 > --- a/notmuch-search.c
\r
133 > +++ b/notmuch-search.c
\r
134 > @@ -423,8 +423,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
135 > output_t output = OUTPUT_SUMMARY;
\r
137 > int limit = -1; /* unlimited */
\r
138 > - const char **search_exclude_tags;
\r
139 > - size_t search_exclude_tags_length;
\r
140 > + notmuch_bool_t no_exclude = FALSE;
\r
143 > enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
\r
144 > @@ -446,6 +445,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
145 > { "files", OUTPUT_FILES },
\r
146 > { "tags", OUTPUT_TAGS },
\r
148 > + { NOTMUCH_OPT_BOOLEAN, &no_exclude, "no-exclude", 'd', 0 },
\r
150 Indentation error. Otherwise this patch LGTM.
\r
152 > { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },
\r
153 > { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0 },
\r
154 > { 0, 0, 0, 0, 0 }
\r
155 > @@ -493,10 +493,15 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
157 > notmuch_query_set_sort (query, sort);
\r
159 > - search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
160 > - (config, &search_exclude_tags_length);
\r
161 > - for (i = 0; i < search_exclude_tags_length; i++)
\r
162 > - notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
163 > + if (!no_exclude) {
\r
164 > + const char **search_exclude_tags;
\r
165 > + size_t search_exclude_tags_length;
\r
167 > + search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
168 > + (config, &search_exclude_tags_length);
\r
169 > + for (i = 0; i < search_exclude_tags_length; i++)
\r
170 > + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
173 > switch (output) {
\r