[PATCH v3 5/7] Introduce _notmuch_message_has_term()
[notmuch-archives.git] / 86 / 48770029a765bd3248eb19b94474ece650bdb5
1 Return-Path: <wking@tremily.us>\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 6AD64431FBD\r
6         for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 08:46:56 -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: -0.1\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.1 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         RCVD_IN_DNSWL_NONE=-0.0001] 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 DGOF0eqg7fa6 for <notmuch@notmuchmail.org>;\r
17         Wed, 23 Apr 2014 08:46:49 -0700 (PDT)\r
18 Received: from QMTA11.westchester.pa.mail.comcast.net\r
19         (qmta11.westchester.pa.mail.comcast.net [76.96.59.211])\r
20         by olra.theworths.org (Postfix) with ESMTP id 652EA431FAE\r
21         for <notmuch@notmuchmail.org>; Wed, 23 Apr 2014 08:46:49 -0700 (PDT)\r
22 Received: from omta02.westchester.pa.mail.comcast.net ([76.96.62.19])\r
23         by QMTA11.westchester.pa.mail.comcast.net with comcast\r
24         id tPUs1n0010QuhwU5BTmp26; Wed, 23 Apr 2014 15:46:49 +0000\r
25 Received: from odin.tremily.us ([24.18.63.50])\r
26         by omta02.westchester.pa.mail.comcast.net with comcast\r
27         id tTkm1n01A152l3L3NTkndJ; Wed, 23 Apr 2014 15:44:49 +0000\r
28 Received: by odin.tremily.us (Postfix, from userid 1000)\r
29         id 46014116ABBF; Wed, 23 Apr 2014 08:44:46 -0700 (PDT)\r
30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tremily.us; s=odin;\r
31         t=1398267886; bh=jMOvi8hUVhTap1dDq1Npcz4LVMnt67xOF8IYYpvEK+o=;\r
32         h=Date:From:To:Cc:Subject:References:In-Reply-To;\r
33         b=Gb7ooAIxZAu/XnAOtWmFJifc820te/QZt2/YfJenvX3zGqOf03dLmXmnKwdznsk5S\r
34         jmoKMWT/7DNxigFANZURpQJIiKQvkQaH7FgylMb2iEVN+ANGMljnNSOUfpnpmGoTXt\r
35         7FgWbG7oNcGQ1p4Ub1aLUJ9llfab0+GoJ4ZnlNpA=\r
36 Date: Wed, 23 Apr 2014 08:44:46 -0700\r
37 From: "W. Trevor King" <wking@tremily.us>\r
38 To: Carl Worth <cworth@cworth.org>\r
39 Subject: Re: Thanks for the nmbug-status program\r
40 Message-ID: <20140423154445.GN9243@odin.tremily.us>\r
41 References: <87eh0prrup.fsf@yoom.home.cworth.org>\r
42         <20140422213442.GI9243@odin.tremily.us>\r
43         <8761m1rmtp.fsf@yoom.home.cworth.org>\r
44         <20140423001824.GM9243@odin.tremily.us>\r
45         <87wqegr3dm.fsf@yoom.home.cworth.org>\r
46 MIME-Version: 1.0\r
47 Content-Type: multipart/signed; micalg=pgp-sha1;\r
48         protocol="application/pgp-signature"; boundary="j1Wwy33+dU2Jf0xa"\r
49 Content-Disposition: inline\r
50 In-Reply-To: <87wqegr3dm.fsf@yoom.home.cworth.org>\r
51 OpenPGP: id=39A2F3FA2AB17E5D8764F388FC29BDCDF15F5BE8;\r
52         url=http://tremily.us/pubkey.txt\r
53 User-Agent: Mutt/1.5.23 (2014-03-12)\r
54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
55         s=q20140121; t=1398268009;\r
56         bh=zGFZ3ty7gX81yeOj8me8e+pfN01c696oQBaT9EFALdo=;\r
57         h=Received:Received:Received:Date:From:To:Subject:Message-ID:\r
58         MIME-Version:Content-Type;\r
59         b=cyHclQHcBvZl0UE1fWMRUZeyRqT3TMUCT+4oDu5PR069O8QprAf1vMyr5iRLortzC\r
60         s/cex9Bqd+ADrJDzOOs28I/r2SO6JEbZKo02QOqmISoXwG3xJrS16kSBLRDgyF3SIv\r
61         qxQeugyAwwk+CMOmUi8/JvYdqUm5Bazvz802ndebDS4YpCQ+fR/EDelDNq7S4YbxOr\r
62         zqhjWlxnY+bM7b0EvYhmlJwgSxCC5rbR5ACu4kykDvTFkcygfSKKIPYtYt35CU3GJ2\r
63         NjYGddkkvHubiw4+xapTjhBQmQjSeJiXZ+utpd6+hePP8xLft5AqW5xuodRWfilMIh\r
64         AHOlGOcFQYOxw==\r
65 Cc: Notmuch List <notmuch@notmuchmail.org>\r
66 X-BeenThere: notmuch@notmuchmail.org\r
67 X-Mailman-Version: 2.1.13\r
68 Precedence: list\r
69 List-Id: "Use and development of the notmuch mail system."\r
70         <notmuch.notmuchmail.org>\r
71 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
72         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
73 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
74 List-Post: <mailto:notmuch@notmuchmail.org>\r
75 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
76 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
77         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
78 X-List-Received-Date: Wed, 23 Apr 2014 15:46:56 -0000\r
79 \r
80 \r
81 --j1Wwy33+dU2Jf0xa\r
82 Content-Type: text/plain; charset=utf-8\r
83 Content-Disposition: inline\r
84 Content-Transfer-Encoding: quoted-printable\r
85 \r
86 On Tue, Apr 22, 2014 at 11:01:09PM -0700, Carl Worth wrote:\r
87 > W. Trevor King writes:\r
88 > >> > I think that making nmbug and nmbug-status generally applicable\r
89 > >> > for other projects is a good target.  I don't see any need to\r
90 > >> > pull them out into a stand-alone project to do that though.\r
91 > >>=20\r
92 > >> For what it's worth, I don't disagree.\r
93 > >\r
94 > > Does that mean your patches are aimed upstream at the notmuch\r
95 > > repository?\r
96 >=20\r
97 > I didn't really intend them that way. What I meant was that I'd be\r
98 > happy to switch to a script within the notmuch repository if it did\r
99 > what I wanted, (which is basically just "create an HTML file from a\r
100 > notmuch query").\r
101 \r
102 So, =E2=80=9Chere's a goal to shoot for, and I'm happy with my fork.  If\r
103 someone else wants to land patches like these upstream, I'm also happy\r
104 dropping my fork.=E2=80=9D ;).  I think it would be easier to just mail your\r
105 patches to the list and see what sticks.\r
106 \r
107 > > (or their shell's approriate environment variable syntax), and I'd\r
108 > > version the config file in the same repo as the associated tags.  I\r
109 > > don't see the point of keeping the config file somewhere else, when\r
110 > > you'll already need a repository to store the tags.\r
111 >\r
112 > Ah, then you've missed something different about my usage. I don't\r
113 > have any repository storing tags. My tags exist only in my notmuch\r
114 > database.\r
115 \r
116 I had missed that, thanks for clarifying.  I still like the\r
117 config-from-repository-branch functionality because nmbug tag\r
118 repositories are part of the nmbug-status ecosystem, but I agree that\r
119 you shouldn't need a tag repository if you don't want to collaborate\r
120 on tag maintenance.\r
121 \r
122 > > * d456390 Add a comment describing the program\r
123 > >\r
124 > > I like the idea, but I'd prefer a docstring just after the leading\r
125 > > comment.  Then we could reuse the docstring as the description for\r
126 > > the ArgumentParser.\r
127 >=20\r
128 > Sure. That's better.\r
129 \r
130 Would you like to write that up?\r
131 \r
132 > > * 336411f Add "notmuch search" to the advertised queries.\r
133 > >\r
134 > > Folks can already copy-paste the terms into Emacs etc.  You only\r
135 > > need the 'notmuch search' prefix if you're pasting into a shell,\r
136 > > in which case you'll also want to escape shell-sensitive\r
137 > > characters like parenthesis.  I'm fine without this one.\r
138 >=20\r
139 > This is more about advertising notmuch to people not familiar with\r
140 > it. It's more important for something like "mesa stable queue" than\r
141 > it is for the notmuch bug list, of course.\r
142 \r
143 That makes sense, but I'd prefer something like:\r
144 \r
145   <p>This view is generated from the following\r
146     <a href=3D"http://notmuchmail.org/searching/">Notmuch query</a>:\r
147   </p>\r
148   <p>\r
149     <code>\r
150   view['query-string']\r
151     </code>\r
152   </p>\r
153 \r
154 That name-drops Notmuch without implying that the whole thing is\r
155 copy-pastable into a shell.  Neither your queries [1] nor our\r
156 nmbug-status queries [2] use parens at the moment, but the current\r
157 master's example config does [3].\r
158 \r
159 > > * 396869c Add support for a --query option (along with a default config=\r
160 uration)\r
161 > >\r
162 > > I don't have an opinion about this one ;).  The default config doesn't\r
163 > > look very useful (especially with it's dummy metadata settings), but\r
164 > > I'd only be using the in-Git-config approach, and I don't mind if\r
165 > > others want something like this.\r
166 >=20\r
167 > This is about making this script self-documenting.\r
168 >=20\r
169 > When I first tried nmbug-status I got just a stack trace[*], not even a\r
170 > usage message.\r
171 \r
172 Heh, that should probably be fixed ;).  There's a nice example config\r
173 at devel/nmbug/status-config.json, but something that's bound more\r
174 tightly to the script itself seems useful.\r
175 \r
176 > Even after running "nmbug-status --help" I wasn't any closer to\r
177 > knowing how to run the thing. It wasn't obvious that --config was\r
178 > the option I needed to get things to work, (from the stack trace,\r
179 > clearly this script wants some git repository somewhere), and even\r
180 > if I had know that --config was what I wanted, I had no idea how to\r
181 > construct a config file.\r
182 \r
183 I hadn't understood that your built-in config was more of a\r
184 teaser/seed for new users, it makes more sense in that light.  I'd\r
185 prefer a clearer error message when we can't find a config file (I'm\r
186 working up a patch now ;), and documentation for the config file\r
187 format in 'nmbug-status --help' (where it's clearly static assistence\r
188 for unfamiliar users).\r
189 \r
190 Cheers,\r
191 Trevor\r
192 \r
193 [1]: http://cworth.org/~cworth/mesa-stable-queue/\r
194 [2]: http://nmbug.tethera.net/status/\r
195 [3]: http://git.notmuchmail.org/git/notmuch/blob/40dc79d6ac828bc24ae1ec797a=\r
196 a50e53fc455621:/devel/nmbug/status-config.json#l65\r
197 \r
198 --=20\r
199 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).\r
200 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy\r
201 \r
202 --j1Wwy33+dU2Jf0xa\r
203 Content-Type: application/pgp-signature; name="signature.asc"\r
204 Content-Description: OpenPGP digital signature\r
205 \r
206 -----BEGIN PGP SIGNATURE-----\r
207 Version: GnuPG v2.0.22 (GNU/Linux)\r
208 \r
209 iQIcBAEBAgAGBQJTV9/rAAoJEKKfehoaNkbtASwP/jgLDvQxgP0MB+DDbM1DrdtD\r
210 yj0kzbuCZWUmXBeMFvEllfEXaySDhR5Q38N7ZL0rZhAQRYwif+a63MworaCFk6VB\r
211 u4u4DlyJR0nj1o2mNjGTugv5x/aOUm4T1RTklJ5+v214LfBFKBVAtWqxU+AUglz/\r
212 JFa23PZNiJ/CFmvxpPnxJ4GD8EHlaRUUikOPIrP1h9RFga5XYhPLagu9shYX5pOB\r
213 Udao6NOoLftiHxioyT9SBc9CYNTAb9F9jBtJ1uvLG3HBxVwqgaxE1rbqersOU26a\r
214 MPQU57yGvKzungJIgdkpydGDwmmO7Uc6tVNpBvwvAuHswFzn4X3NQtwmZ0DbW6Fu\r
215 p0lrEyEEeurXo1nFDbObIKmxyC0wWcF9CzRKsakBHTYHxkZjxKCV3kOwv+E50Pbf\r
216 AoRON3BaLIQzLfxQn+Rq/KyxMQG7+yQZfwaQC7mb759qUvxY/8CE66EAwxrzDBtY\r
217 QhXNs1YT4YGeXxRvZkXe2QWYBFC+9lQ1i4xp5vHi+4rDCM8VwqJLfE6Qi+9nlZr1\r
218 w+OsNs5u5+Dfe71/Avw/gMpbvi4Raw3fhMEP5OX6cMHs1ouhi8UxONe7Md/4IO5g\r
219 KU09R070phMhdUintd+q+zV4S8ubuOd5UOQaRXLWjHpz3Gdv/5/jblkwhhsUTrJP\r
220 4IdPXNXIWH1OuEJJReyG\r
221 =EZAK\r
222 -----END PGP SIGNATURE-----\r
223 \r
224 --j1Wwy33+dU2Jf0xa--\r