Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / a1 / 7c263d1650bce90d14cfcfd669c9b77f2c2183
1 Return-Path: <jrollins@finestructure.net>\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 DBDCC42117E\r
6         for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 15:38:50 -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: -2.3\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_MED=-2.3] 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 oH0lqkaxR6Y9 for <notmuch@notmuchmail.org>;\r
16         Sat, 14 Jan 2012 15:38:50 -0800 (PST)\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu\r
18         [131.215.239.19])\r
19         by olra.theworths.org (Postfix) with ESMTP id BAC2842117C\r
20         for <notmuch@notmuchmail.org>; Sat, 14 Jan 2012 15:38:49 -0800 (PST)\r
21 Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1])\r
22         by fire-doxen-postvirus (Postfix) with ESMTP id 5403E2E50DA4;\r
23         Sat, 14 Jan 2012 15:38:49 -0800 (PST)\r
24 X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new\r
25 Received: from finestructure.net (cpe-76-174-137-84.socal.res.rr.com\r
26         [76.174.137.84]) (Authenticated sender: jrollins)\r
27         by fire-doxen-submit (Postfix) with ESMTP id 82DC62E507DB;\r
28         Sat, 14 Jan 2012 15:38:45 -0800 (PST)\r
29 Received: by finestructure.net (Postfix, from userid 1000)\r
30         id 1923932B; Sat, 14 Jan 2012 15:38:45 -0800 (PST)\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>\r
32 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
33 Subject: Re: [PATCH v2 2/3] lib: Add support for automatically excluding tags\r
34         from queries\r
35 In-Reply-To: <1326496024-14403-3-git-send-email-amdragon@mit.edu>\r
36 References: <1326258173-21163-1-git-send-email-amdragon@mit.edu>\r
37         <1326496024-14403-1-git-send-email-amdragon@mit.edu>\r
38         <1326496024-14403-3-git-send-email-amdragon@mit.edu>\r
39 User-Agent: Notmuch/0.11+63~g6965a07 (http://notmuchmail.org) Emacs/23.3.1\r
40         (x86_64-pc-linux-gnu)\r
41 Date: Sat, 14 Jan 2012 15:38:44 -0800\r
42 Message-ID: <87zkdpsvln.fsf@servo.finestructure.net>\r
43 MIME-Version: 1.0\r
44 Content-Type: multipart/signed; boundary="=-=-=";\r
45         micalg=pgp-sha256; protocol="application/pgp-signature"\r
46 X-BeenThere: notmuch@notmuchmail.org\r
47 X-Mailman-Version: 2.1.13\r
48 Precedence: list\r
49 List-Id: "Use and development of the notmuch mail system."\r
50         <notmuch.notmuchmail.org>\r
51 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
52         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
53 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
54 List-Post: <mailto:notmuch@notmuchmail.org>\r
55 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
56 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
57         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
58 X-List-Received-Date: Sat, 14 Jan 2012 23:38:51 -0000\r
59 \r
60 --=-=-=\r
61 Content-Type: text/plain; charset=utf-8\r
62 Content-Transfer-Encoding: quoted-printable\r
63 \r
64 It looks like something in this patch is causing the following build\r
65 warning:\r
66 \r
67 CXX -O2 lib/query.o\r
68 lib/query.cc:26:8: warning: =E2=80=98_notmuch_query=E2=80=99 declared with =\r
69 greater visibility than the type of its field\r
70 =E2=80=98_notmuch_query::exclude_terms=E2=80=99 [-Wattributes]\r
71 \r
72 However, I can't quite figure out what's causing it.\r
73 \r
74 > +void\r
75 > +notmuch_query_add_tag_exclude (notmuch_query_t *query, const char *tag)\r
76 > +{\r
77 > +    char *term =3D talloc_asprintf (query, "%s%s", _find_prefix ("tag"),=\r
78  tag);\r
79 > +    _notmuch_string_list_append (query->exclude_terms, term);\r
80 > +}\r
81 \r
82 This is really not an issue with this patch at all, and it should NOT\r
83 prevent it from being applied, but this came up briefly on IRC and I'm\r
84 curious, so I'll ask about it here.\r
85 \r
86 Are terms ALWAYS lower cased?  If not, it seems to me it's possible to\r
87 have an indexed term 'Kspam' that would get confused with the term\r
88 'spam' prefixed with the keyword prefix 'K' (which we use for tags).\r
89 Maybe this degeneracy is broken by the query parser somehow (or maybe by\r
90 the fact that tags are boolean terms?), but I wonder if it's not safer\r
91 to use the built-in xapian prefix separator ':', ie:\r
92 \r
93   ... talloc_asprintf (query, "%s:%s", _find_prefix ("tag"), tag);\r
94 \r
95 I guess fixing that globally would require a database rebuild...\r
96 \r
97 Ok, that's totally just an aside, and should not be a blocker for this\r
98 patch.\r
99 \r
100 jamie.\r
101 \r
102 --=-=-=\r
103 Content-Type: application/pgp-signature\r
104 \r
105 -----BEGIN PGP SIGNATURE-----\r
106 Version: GnuPG v1.4.11 (GNU/Linux)\r
107 \r
108 iQIcBAEBCAAGBQJPEhIEAAoJEO00zqvie6q8484QAJvTEE7JhH11U16e5kYiVhj7\r
109 /o5gBPgFJeCmadtASS62wcPv8+Cp9hGSnj8zl7vvoTNPiZ0f2vFvineff1n7YJlq\r
110 14GXALmUqef+lMVrweKDKlIngZFVpe1leIH6lt63fXEaKOKvf31dH6XAo/hP/lgy\r
111 b37qCxwgewouVlbChLBI5WNMmw6syrzEFa/+j0X+3RH33qRs6Jk5V54V77O8b32Y\r
112 GvVUkNgSENSl2TEEKVZlAmeYBohjneVftVXQrLCb9+sVWegZB1q65upRm4JXjEHG\r
113 B0xzCBG/o6xgoOJyWRXMbnG6YpcAkblaoKqWm/pe9t4GYa4KNlagMwbA+9mtROfO\r
114 UbxtDNUZpdbI3xxNKkPumzrEUtRl/7hpcey4JLqd08oekG2WoezzE87F2DQ5mPSZ\r
115 atFBncwl6jTUxYmtPRdqBXz3csFyteJpwFZ6xg0+Zkuxg8TRCF2meQZ5Bw45IVlh\r
116 +Wjs5f+0t0W3t9mN53XHwiRTvkMaBie0neZZ18b/DTLpMT47cpk393VFt78S+Vhu\r
117 jyFbpx9L2uaaidqEeW0zCDQ1gK9pdWl4OCm9inRRzN1hKGN2mKRa+26OUGbWSJ3s\r
118 hjzdHWwU8Dl/LqFz9NxTqKX9dOQqXtbR0AfK3KUnorse4kM8B3a4QhsDkd1vntrv\r
119 rp21084pVi/TuEgrK8XG\r
120 =RbYn\r
121 -----END PGP SIGNATURE-----\r
122 --=-=-=--\r