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 22938431FD0
\r
6 for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 10:56:28 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5
\r
12 tests=[HTML_MESSAGE=0.001, 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 odRhSwQ+q4A0 for <notmuch@notmuchmail.org>;
\r
16 Mon, 4 Jul 2011 10:56:27 -0700 (PDT)
\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 1CF23431FB6
\r
20 for <notmuch@notmuchmail.org>; Mon, 4 Jul 2011 10:56:27 -0700 (PDT)
\r
21 X-AuditID: 1209190d-b7bdeae0000004f8-92-4e11fe73abc4
\r
22 Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])
\r
23 by dmz-mailsec-scanner-2.mit.edu (Symantec Messaging Gateway) with SMTP
\r
24 id C9.EE.01272.37EF11E4; Mon, 4 Jul 2011 13:54:59 -0400 (EDT)
\r
25 Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])
\r
26 by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id p64HuQHH027502;
\r
27 Mon, 4 Jul 2011 13:56:26 -0400
\r
28 Received: from [10.247.103.25] (162.sub-174-252-57.myvzw.com [174.252.57.162])
\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 p64HuFPu021882
\r
32 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT);
\r
33 Mon, 4 Jul 2011 13:56:24 -0400 (EDT)
\r
34 References: <20110703171743.GL15901@mit.edu>
\r
35 <1309762318-4530-1-git-send-email-pieter@praet.org>
\r
36 User-Agent: K-9 Mail for Android
\r
37 In-Reply-To: <1309762318-4530-1-git-send-email-pieter@praet.org>
\r
39 Content-Type: multipart/alternative;
\r
40 boundary="----TNBCPH3ADEBNTKTYUGJVLMN8JRAE0R"
\r
41 Subject: Re: [PROTO] possible solution for "Race condition for '*' command"
\r
42 From: Austin Clements <amdragon@MIT.EDU>
\r
43 Date: Mon, 04 Jul 2011 13:56:26 -0400
\r
44 To: Pieter Praet <pieter@praet.org>
\r
45 Message-ID: <e8c5fbf4-4dfa-461a-8f5c-6c696291a270@email.android.com>
\r
46 X-Brightmail-Tracker:
\r
47 H4sIAAAAAAAAA+NgFprLKsWRmVeSWpSXmKPExsUixG6nolv8T9DP4OwtaYvrN2cyW/x+fYPZ
\r
48 gcnj2apbzB4d+y6zBjBFcdmkpOZklqUW6dslcGXs2fSGreCCWkX31u1MDYyXFboYOTkkBEwk
\r
49 Dr5czAphi0lcuLeerYuRi0NIYB+jxOnvT6Gc9YwSO3rOsUM4F5kkmvt6mUBahAQSJPZsfsQG
\r
50 YosKKEjMmzyREcTmFHCQ2D/lO5jNKyAocXLmExYQm1kgSGLl4fVg9cIC3hKfns4Fi7MJaEhs
\r
51 278crJ5FQFXi1tmD7CC2iICyxOknP9kherUkni25DDXTRWLm1TksExgFZiFZMQvJCghbU+La
\r
52 8S3sELa8RPPW2cwQtobE3GfPmJHFFzCyrWKUTcmt0s1NzMwpTk3WLU5OzMtLLdI10svNLNFL
\r
53 TSndxAgKeU5J3h2M7w4qHWIU4GBU4uGtvCPoJ8SaWFZcmXuIUZKDSUmUd/lfoBBfUn5KZUZi
\r
54 cUZ8UWlOavEhRgkOZiUR3ruLgHK8KYmVValF+TApaQ4WJXFeNe//vkIC6YklqdmpqQWpRTBZ
\r
55 GQ4OJQne9yBDBYtS01Mr0jJzShDSTBycIMN5gIbfAqnhLS5IzC3OTIfIn2LU5Ti36+lhRiGW
\r
56 vPy8VClxXnZgshESACnKKM2DmwNLVa8YxYHeEuZ9CzKKB5jm4Ca9AlrCBLTEKhFsSUkiQkqq
\r
57 gTFEgG/e77TS6X2lbdaPTzS8Zr1icU5zj0b7oXAHxUOOAT7fIvjs1Pp6dl80XXDviIgwx+J5
\r
58 d15/mKLtE6mtkWT3Nejpmkzl7mrZaP1Zyds3Jsc0zwu889Wuek9wpvqKm63sV1ULPrhe1ms5
\r
59 0PExpmDCDktvQ6+HNYWOMnrbF1zaru3HOmnVCSWW4oxEQy3mouJEAMgKKCgwAwAA
\r
60 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
61 X-BeenThere: notmuch@notmuchmail.org
\r
62 X-Mailman-Version: 2.1.13
\r
64 List-Id: "Use and development of the notmuch mail system."
\r
65 <notmuch.notmuchmail.org>
\r
66 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
68 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
69 List-Post: <mailto:notmuch@notmuchmail.org>
\r
70 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
71 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
72 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
73 X-List-Received-Date: Mon, 04 Jul 2011 17:56:28 -0000
\r
75 ------TNBCPH3ADEBNTKTYUGJVLMN8JRAE0R
\r
76 Content-Type: text/plain;
\r
78 Content-Transfer-Encoding: 8bit
\r
80 Ah, this is subtler than I thought. You're right that, for the '*' command, you want only the matched ID's. Tagging a region, however, operates on entire threads. I think it's important to retain this behavior because threads are what the user sees and selects in the search buffer (*, on the other hand, doesn't have a strong visual analogue).
\r
82 (This also means * is not, in fact, equivalent to expanding the region the the entire buffer and then tagging the region.)
\r
84 I should probably emit two lists per thread: one of matched IDs and one of unmatched IDs. Tagging a region can then operate on the concatenation of these, while * can operate only on the matched lists. This should be easy to do. I'll send an updated patch when I'm back at a computer.
\r
86 Sent from my Android. Please excuse my brevity.
\r
88 Pieter Praet <pieter@praet.org> wrote:
\r
92 Unfortunately, your patch causes *all* Message-Id's in the thread to be
\r
93 appended, as opposed to only the ones matching the query:
\r
96 $ notmuch search tag:inbox AND from:amdragon@mit.edu
\r
97 thread:0000000000002777 Yest. 19:17 [1/3] Austin Clements| Pieter Praet;
\r
98 [PATCH 2/2] [RFC] possible solution for "Race condition for '*' command"
\r
99 (inbox replied sent to-me x/notmuch)
\r
100 id:"CAH-f9WticM4EN8F1_ik_-mcBcBtrXwSpO+Drbtp7=UN7McECrg@mail.gmail.com"
\r
101 or id:"87zkkwydag.fsf@praet.org" or id:"20110703171743.GL15901@mit.edu"
\r
104 As you can see, according to matched/total ("[1/3]") only a single
\r
105 message matches the query, yet all 3 MsgId's are returned.
\r
107 If this were to be corrected (probably a trivial change, but I'm pretty
\r
108 much oblivious as to the what and where of it), the following patch
\r
109 series should work as intended.
\r
111 The "--stdin" option works as expected (and ARG_MAX is indeed a very
\r
112 valid concern with this particular use case), but I haven't yet gotten
\r
113 around to making use of it from the Emacs UI as this would require some
\r
114 screwing around with `notmuch-tag' and `notmuch-call-notmuch-process',
\r
115 and it's still pretty early I-).
\r
123 ------TNBCPH3ADEBNTKTYUGJVLMN8JRAE0R
\r
124 Content-Type: text/html;
\r
126 Content-Transfer-Encoding: 8bit
\r
128 <html><head></head><body>Ah, this is subtler than I thought. You're right that, for the '*' command, you want only the matched ID's. Tagging a region, however, operates on entire threads. I think it's important to retain this behavior because threads are what the user sees and selects in the search buffer (*, on the other hand, doesn't have a strong visual analogue).<br>
\r
130 (This also means * is not, in fact, equivalent to expanding the region the the entire buffer and then tagging the region.)<br>
\r
132 I should probably emit two lists per thread: one of matched IDs and one of unmatched IDs. Tagging a region can then operate on the concatenation of these, while * can operate only on the matched lists. This should be easy to do. I'll send an updated patch when I'm back at a computer.<br>
\r
134 Sent from my Android. Please excuse my brevity.<br><br><div class="gmail_quote">Pieter Praet <pieter@praet.org> wrote:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
\r
135 <pre style="white-space: pre-wrap; word-wrap:break-word; font-family: sans-serif">Thanks Austin!<br /><br />Unfortunately, your patch causes *all* Message-Id's in the thread to be<br />appended, as opposed to only the ones matching the query:<br /><br />#+BEGIN_EXAMPLE<br />$ notmuch search tag:inbox AND from:amdragon@mit.edu<br />thread:0000000000002777 Yest. 19:17 [1/3] Austin Clements| Pieter Praet;<br />[PATCH 2/2] [RFC] possible solution for "Race condition for '*' command"<br />(inbox replied sent to-me x/notmuch)<br />id:"CAH-f9WticM4EN8F1_ik_-mcBcBtrXwSpO+Drbtp7=UN7McECrg@mail.gmail.com"<br />or id:"87zkkwydag.fsf@praet.org" or id:"20110703171743.GL15901@mit.edu"<br />#+END_EXAMPLE<br /><br />As you can see, according to matched/total ("[1/3]") only a single<br />message matches the query, yet all 3 MsgId's are returned.<br /><br />If this were to be corrected (probably a trivial change, but I'm pretty<br />much oblivious as to the what and where of it), the following
\r
136 patch<br />series should work as intended.<br /><br />The "--stdin" option works as expected (and ARG_MAX is indeed a very<br />valid concern with this particular use case), but I haven't yet gotten<br />around to making use of it from the Emacs UI as this would require some<br />screwing around with `notmuch-tag' and `notmuch-call-notmuch-process',<br />and it's still pretty early I-).<br /><br />Peace<br /><br />-- <br />Pieter<br /><br /></pre></blockquote></div></body></html>
\r
137 ------TNBCPH3ADEBNTKTYUGJVLMN8JRAE0R--
\r