Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 50 / 442e77ea27b4b295bbee9c09ef695d91790e58
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 0667B431FB6\r
6         for <notmuch@notmuchmail.org>; Fri, 25 Feb 2011 12:46:08 -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: 0.01\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.01 tagged_above=-999 required=5\r
12         tests=[T_MIME_NO_TEXT=0.01] 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 v-DHUd3CM1pA for <notmuch@notmuchmail.org>;\r
16         Fri, 25 Feb 2011 12:46:07 -0800 (PST)\r
17 Received: from paneer.cc.columbia.edu (paneer.cc.columbia.edu [128.59.29.4])\r
18         by olra.theworths.org (Postfix) with ESMTP id 19C5A431FB5\r
19         for <notmuch@notmuchmail.org>; Fri, 25 Feb 2011 12:46:07 -0800 (PST)\r
20 Received: from servo.finestructure.net (cpe-76-166-146-235.socal.res.rr.com\r
21         [76.166.146.235])\r
22         (user=jgr2110 author=jrollins@servo.finestructure.net mech=PLAIN\r
23         bits=0)\r
24         by paneer.cc.columbia.edu (8.14.4/8.14.3) with ESMTP id p1PKk36Z001377\r
25         (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
26         Fri, 25 Feb 2011 15:46:04 -0500 (EST)\r
27 Received: from jrollins by servo.finestructure.net with local (Exim 4.72)\r
28         (envelope-from <jrollins@finestructure.net>)\r
29         id 1Pt2GH-0005MA-41; Fri, 25 Feb 2011 10:19:29 -0800\r
30 From: Jameson Rollins <jrollins@finestructure.net>\r
31 To: Mark Anderson <MarkR.Anderson@amd.com>, notmuch@notmuchmail.org\r
32 Subject: Re: Strange match to my query\r
33 In-Reply-To: <3wd4o8wa7fx.fsf@testarossa.amd.com>\r
34 References: <3wd4o8wa7fx.fsf@testarossa.amd.com>\r
35 User-Agent: Notmuch/0.5-102-ge86ac1d (http://notmuchmail.org) Emacs/23.2.1\r
36         (i486-pc-linux-gnu)\r
37 Date: Fri, 25 Feb 2011 10:19:21 -0800\r
38 Message-ID: <878vx4vuxi.fsf@servo.finestructure.net>\r
39 MIME-Version: 1.0\r
40 Content-Type: multipart/signed; boundary="=-=-=";\r
41         micalg=pgp-sha256; protocol="application/pgp-signature"\r
42 X-No-Spam-Score: Local\r
43 X-Scanned-By: MIMEDefang 2.68 on 128.59.29.4\r
44 X-BeenThere: notmuch@notmuchmail.org\r
45 X-Mailman-Version: 2.1.13\r
46 Precedence: list\r
47 List-Id: "Use and development of the notmuch mail system."\r
48         <notmuch.notmuchmail.org>\r
49 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
51 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
52 List-Post: <mailto:notmuch@notmuchmail.org>\r
53 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
54 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
56 X-List-Received-Date: Fri, 25 Feb 2011 20:46:08 -0000\r
57 \r
58 --=-=-=\r
59 Content-Transfer-Encoding: quoted-printable\r
60 \r
61 On Tue, 25 Jan 2011 16:29:22 -0700, Mark Anderson <MarkR.Anderson@amd.com> =\r
62 wrote:\r
63 > Apparently matching on email addresses doesn't work the way I hoped.\r
64 >=20\r
65 > While debugging why my to:x@y.com search was matching far too many\r
66 > entries, I whittled it down to this:\r
67 >=20\r
68 > WORD1=3Dhello\r
69 > WORD2=3Dgoodbye\r
70 > MSGID=3Djunk$(date +%s)\r
71 > TESTDIR=3D$(notmuch config get database.path)/.tmp/new\r
72 > TESTMAIL=3D$TESTDIR/$MSGID:2,\r
73 >=20\r
74 > mkdir -p $TESTDIR\r
75 >=20\r
76 > echo Testcase for $WORD1@$WORD2, msgid: $MSGID@junk.com\r
77 >=20\r
78 > echo "From: nobody@nobody.com\r
79 > To: c@${WORD1}.com, K-R@${WORD2}.com\r
80 > Date: Mon, 24 Jan 2011 23:41:34 -0600\r
81 > Subject: Error\r
82 > Message-ID: <$MSGID@junk.com>\r
83 >=20\r
84 > Not empty body.=3D\r
85 >=20\r
86 > " > $TESTMAIL\r
87 >=20\r
88 > notmuch new\r
89 > notmuch search --output=3Dfiles to:$WORD1@$WORD2\r
90 > notmuch search --output=3Dfiles to:\"$WORD1@$WORD2\"\r
91 >=20\r
92 > Why does that match, but this doesn't?\r
93 >=20\r
94 > notmuch search --output=3Dfiles to:\'$WORD1@$WORD2\'\r
95 \r
96 Hey, guys.  Reopening an old thread here, found while trying to track\r
97 down a similar problem.\r
98 \r
99 I'm confused why any of these searches should return anything at all.\r
100 "$WORD1@$WORD2" doesn't actually match either of the addresses in the\r
101 test message, especially when quoted.  The expanded addresses should be:\r
102 \r
103   c@hello.com\r
104   K-R@goodbye.com\r
105 \r
106 Why should\r
107 \r
108   hello@goodbye\r
109 \r
110 match anything?  And in fact it doesn't for me if I recreate the same\r
111 setup.  Am I missing something?\r
112 \r
113 jamie.\r
114 \r
115 --=-=-=\r
116 Content-Type: application/pgp-signature\r
117 \r
118 -----BEGIN PGP SIGNATURE-----\r
119 Version: GnuPG v1.4.10 (GNU/Linux)\r
120 \r
121 iQIcBAEBCAAGBQJNZ/KpAAoJEO00zqvie6q8IEsP/RpnHtDuWOJm4b6hENK09J8O\r
122 vF8Uc5Nc8kfR3bZg9jwTaXJ8qncUjh4tKAtxY924O/7j6Jm+hsVzSRZHgoc5F0qn\r
123 6hYCXt9xN8982zAXLz9v3tGHI/xTtObP3CqniPp+/fxHs8k3Gss1gdLapH+c4Efc\r
124 PhnPNSjDNa39DItOpyNGVs8iU7m0oZWPEcR+54hiFIvCBIHMPZyJVX2djVkmyhw0\r
125 gtcjfXDHp0+GK+NpCZpbXLuYr86VdFr//HsGVMh5ieWnRGhHObV+WiM/EwVJBmIz\r
126 xfJN6M294ZRTB/CIbA5OJDybWHu4BmJCTCJxrJlhY0WIHiIx9LYeJQfFXGoeg6Qr\r
127 3xFHJPcPG6J89GubDmcpLx/mQr2Sop1q2uwYfvbpmFlyuz/pzbxGlA6g1EuFBg8R\r
128 sQ2ZRkmnZW9OmkEDHvVNs/D9nF0wiSr8ed1dS6eeN+iD4n7j4VcJzLnWW6Xq4knv\r
129 pS7gFEQ8PXxL5wdU2jpe5DGcKRkHZNkBS3g8f6n+54nYmC2/G2FpLfx6Lv4Raw3h\r
130 NO3aSxg9X4XCFElNziFWcHqOQB7WSCv6x8tK8ciDjw7py21wqWArrv+i3XdQsqX6\r
131 LfvOczZfTzVxNHwSKhU+uukuhHN8pU2SLNlFAphaOlTsj3iz7tHis8+Q77zVLqVu\r
132 siTYaOTIM2Iqb8QBiK6U\r
133 =qCbg\r
134 -----END PGP SIGNATURE-----\r
135 --=-=-=--\r