Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 30 / 25c973cd09a2d5502b210f26d967425ff8deb9
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 1D48F429E34\r
6         for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 03:39:01 -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.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 0RnTGWMhjgf2 for <notmuch@notmuchmail.org>;\r
17         Tue, 31 Jan 2012 03:39:00 -0800 (PST)\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 5A4C5431E64\r
22         for <notmuch@notmuchmail.org>; Tue, 31 Jan 2012 03:39:00 -0800 (PST)\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 1RsC35-0002PT-BP; Tue, 31 Jan 2012 11:38:55 +0000\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 1RsC34-0006DK-QH; Tue, 31 Jan 2012 11:38:55 +0000\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: Austin Clements <amdragon@MIT.EDU>\r
34 Subject: Re: [PATCH 1/7] cli: add --do-not-exclude option to count and search.\r
35 In-Reply-To: <20120131041732.GY17991@mit.edu>\r
36 References: <8762fu4aqt.fsf@qmul.ac.uk>\r
37         <1327862394-14334-1-git-send-email-markwalters1009@gmail.com>\r
38         <20120131041732.GY17991@mit.edu>\r
39 User-Agent: Notmuch/0.11+137~g98adc3d (http://notmuchmail.org) Emacs/23.2.1\r
40         (i486-pc-linux-gnu)\r
41 Date: Tue, 31 Jan 2012 11:40:00 +0000\r
42 Message-ID: <871uqgdrsf.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: f70a79ed6187b09a558b60e6f55ed0b5 (of first 20000 bytes)\r
48 X-SpamAssassin-Score: -1.8\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.8 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         *  0.5 AWL AWL: From: address is in the auto white-list\r
63 X-QM-Scan-Virus: ClamAV says the message is clean\r
64 Cc: notmuch@notmuchmail.org\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: Tue, 31 Jan 2012 11:39:01 -0000\r
78 \r
79 \r
80 Thanks for the review. Almost all of it (for all all the patches) I\r
81 agree with and will just fix but I do have a couple of queries.\r
82 \r
83 On Mon, 30 Jan 2012 23:17:32 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
84 > Quoth Mark Walters on Jan 29 at  6:39 pm:\r
85 > > This option turns off the exclusion so all matching messages are\r
86 > > returned. We do not need to add this to show as notmuch-show does not\r
87 > > (yet) exclude.\r
88 > > ---\r
89 > >  notmuch-count.c  |   12 ++++++++----\r
90 > >  notmuch-search.c |   12 ++++++++----\r
91 > >  2 files changed, 16 insertions(+), 8 deletions(-)\r
92 > > \r
93 > > diff --git a/notmuch-count.c b/notmuch-count.c\r
94 > > index 63459fb..c88975e 100644\r
95 > > --- a/notmuch-count.c\r
96 > > +++ b/notmuch-count.c\r
97 > > @@ -37,6 +37,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
98 > >      int output = OUTPUT_MESSAGES;\r
99 > >      const char **search_exclude_tags;\r
100 > >      size_t search_exclude_tags_length;\r
101 > > +    notmuch_bool_t do_not_exclude = FALSE;\r
102 > >      unsigned int i;\r
103 > >  \r
104 > >      notmuch_opt_desc_t options[] = {\r
105 > > @@ -44,6 +45,7 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
106 > >       (notmuch_keyword_t []){ { "threads", OUTPUT_THREADS },\r
107 > >                               { "messages", OUTPUT_MESSAGES },\r
108 > >                               { 0, 0 } } },\r
109 > > +   { NOTMUCH_OPT_BOOLEAN,  &do_not_exclude, "do-not-exclude", 'd', 0 },\r
110\r
111 > Maybe just "no-exclude"?  "do-not-exclude" seems needlessly verbose.\r
112 \r
113 The reason I went for verbose do-not-exclude was to try and avoid the\r
114 double negative ambiguity: does no-exclude mean do-not-exclude or\r
115 do-note-return-excluded-messages. Possibly I am worrying needlessly, and\r
116 obviously I am quite happy to change.\r
117 \r
118 > Also, you have an extra space after the first comma.\r
119 \r
120 Will fix.\r
121 \r
122\r
123 > >     { 0, 0, 0, 0, 0 }\r
124 > >      };\r
125 > >  \r
126 > > @@ -78,10 +80,12 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
127 > >     return 1;\r
128 > >      }\r
129 > >  \r
130 > > -    search_exclude_tags = notmuch_config_get_search_exclude_tags\r
131 > > -   (config, &search_exclude_tags_length);\r
132 > > -    for (i = 0; i < search_exclude_tags_length; i++)\r
133 > > -   notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
134 > > +    if (!do_not_exclude) {\r
135\r
136 > You could move search_exclude_tags and search_exclude_tags_length in\r
137 > here now that it's a block (but you don't have to).\r
138 \r
139 Will fix\r
140 \r
141 > > +   search_exclude_tags = notmuch_config_get_search_exclude_tags\r
142 > > +       (config, &search_exclude_tags_length);\r
143 > > +   for (i = 0; i < search_exclude_tags_length; i++)\r
144 > > +       notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
145 > > +    }\r
146 > >  \r
147 > >      switch (output) {\r
148 > >      case OUTPUT_MESSAGES:\r
149 > > diff --git a/notmuch-search.c b/notmuch-search.c\r
150 > > index d504051..084dd05 100644\r
151 > > --- a/notmuch-search.c\r
152 > > +++ b/notmuch-search.c\r
153 > > @@ -425,6 +425,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
154 > >      int limit = -1; /* unlimited */\r
155 > >      const char **search_exclude_tags;\r
156 > >      size_t search_exclude_tags_length;\r
157 > > +    notmuch_bool_t do_not_exclude = FALSE;\r
158 > >      unsigned int i;\r
159 > >  \r
160 > >      enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }\r
161 > > @@ -446,6 +447,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
162 > >                               { "files", OUTPUT_FILES },\r
163 > >                               { "tags", OUTPUT_TAGS },\r
164 > >                               { 0, 0 } } },\r
165 > > +        { NOTMUCH_OPT_BOOLEAN,  &do_not_exclude, "do-not-exclude", 'd', 0 },\r
166\r
167 > Same.\r
168 \r
169 Will fix\r
170 \r
171\r
172 > >     { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },\r
173 > >     { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0  },\r
174 > >     { 0, 0, 0, 0, 0 }\r
175 > > @@ -493,10 +495,12 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
176 > >  \r
177 > >      notmuch_query_set_sort (query, sort);\r
178 > >  \r
179 > > -    search_exclude_tags = notmuch_config_get_search_exclude_tags\r
180 > > -   (config, &search_exclude_tags_length);\r
181 > > -    for (i = 0; i < search_exclude_tags_length; i++)\r
182 > > -   notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
183 > > +    if (!do_not_exclude) {\r
184 > > +   search_exclude_tags = notmuch_config_get_search_exclude_tags\r
185 > > +       (config, &search_exclude_tags_length);\r
186 > > +   for (i = 0; i < search_exclude_tags_length; i++)\r
187 > > +       notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
188 > > +    }\r
189 > >  \r
190 > >      switch (output) {\r
191 > >      default:\r
192 \r
193 Thanks\r
194 \r
195 Mark\r
196 \r