notmuch.el: controlling what does and doesn't get expanded in searches
[notmuch-archives.git] / 13 / d9b41c2ce7272c3de358469d394c983975a82c
1 Return-Path: <pieter@praet.org>\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 02B16429E25\r
6         for <notmuch@notmuchmail.org>; Sat,  2 Jul 2011 07:20:45 -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.7\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
12         tests=[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 xIr6vvzGkZeU for <notmuch@notmuchmail.org>;\r
16         Sat,  2 Jul 2011 07:20:44 -0700 (PDT)\r
17 Received: from mail-wy0-f181.google.com (mail-wy0-f181.google.com\r
18         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id A0B41431FD0\r
21         for <notmuch@notmuchmail.org>; Sat,  2 Jul 2011 07:20:44 -0700 (PDT)\r
22 Received: by wyh22 with SMTP id 22so3070359wyh.26\r
23         for <notmuch@notmuchmail.org>; Sat, 02 Jul 2011 07:20:43 -0700 (PDT)\r
24 Received: by 10.227.156.70 with SMTP id v6mr3876933wbw.21.1309616443125;\r
25         Sat, 02 Jul 2011 07:20:43 -0700 (PDT)\r
26 Received: from localhost (91.216-242-81.adsl-dyn.isp.belgacom.be\r
27         [81.242.216.91])\r
28         by mx.google.com with ESMTPS id fp5sm1811256wbb.66.2011.07.02.07.20.40\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Sat, 02 Jul 2011 07:20:41 -0700 (PDT)\r
31 From: Pieter Praet <pieter@praet.org>\r
32 To: Austin Clements <amdragon@mit.edu>\r
33 Subject: Re: [PATCH 2/2] [RFC] possible solution for "Race condition for '*'\r
34         command"\r
35 In-Reply-To:\r
36  <CAH-f9WticM4EN8F1_ik_-mcBcBtrXwSpO+Drbtp7=UN7McECrg@mail.gmail.com>\r
37 References:\r
38  <CAH-f9WticM4EN8F1_ik_-mcBcBtrXwSpO+Drbtp7=UN7McECrg@mail.gmail.com>\r
39 User-Agent: Notmuch/0.5-315-g34bd5eb (http://notmuchmail.org) Emacs/23.1.50.1\r
40         (x86_64-pc-linux-gnu)\r
41 Date: Sat, 02 Jul 2011 16:20:39 +0200\r
42 Message-ID: <87zkkwydag.fsf@praet.org>\r
43 MIME-Version: 1.0\r
44 Content-Type: text/plain; charset=us-ascii\r
45 Cc: notmuch@notmuchmail.org\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, 02 Jul 2011 14:20:46 -0000\r
59 \r
60 On Fri, 1 Jul 2011 12:37:11 -0400, Austin Clements <amdragon@mit.edu> wrote:\r
61 Non-text part: multipart/alternative\r
62 > On Jul 1, 2011 10:55 AM, "Austin Clements" <amdragon@mit.edu> wrote:\r
63 > >\r
64 > > On Thu, Jun 30, 2011 at 3:38 PM, Pieter Praet <pieter@praet.org> wrote:\r
65 > > > Ok, even though my very first reply [1] may have created the impression\r
66 > > > that I understood the issue, I clearly didn't...\r
67 > > >\r
68 > > > The test [2] needs a more applicable commit message, and the subsequent\r
69 > > > patch [3] points more or less in the right direction, but the Message-Id\r
70 > > > list should be local to the *search buffer* rather than to the\r
71 > > > `notmuch-search-operate-all' function.\r
72 > > >\r
73 > > > `notmuch-search' could:\r
74 > > >  - run "notmuch-command search" with the "--output=messages" option\r
75 > > >    instead of a plain search,\r
76 > > >  - maintain a buffer-local var with a list of returned Message-Id's,\r
77 > > >  - ...and populate the buffer based on that list.\r
78 > > >\r
79 > > > As such we'd have -for each individual search buffer- a canonical list\r
80 > > > of Message-Id's (i.e. messages which actually *match* the query AND are\r
81 > > > currently visible in the search buffer), to be used by\r
82 > > > `notmuch-search-operate-all' et al.\r
83 > > >\r
84 > > >\r
85 > > > Peace\r
86 > > >\r
87 > > > --\r
88 > > > Pieter\r
89 > > >\r
90 > > > [1] id:"87fwmuxxgd.fsf@praet.org"\r
91 > > > [2] id:"1309450108-2793-2-git-send-email-pieter@praet.org"\r
92 > > > [3] id:"1309450108-2793-1-git-send-email-pieter@praet.org"\r
93 > >\r
94 > > Ideally, this wouldn't be per-buffer, but per *line*.  This race\r
95 > > equally affects adding and removing tags from individual results,\r
96 > > since that's done using a thread: query, whose results could have\r
97 > > changed since the original search.\r
98 > >\r
99 > > This almost certainly requires support from the notmuch core.  The\r
100 > > good news is that the library already provides this information, so\r
101 > > there will be virtually no performance hit for outputting it.\r
102\r
103 > Actually, with a smidgeon of library support, you could even use document\r
104 > IDs for this, rather than message IDs, which would make the tagging\r
105 > operations (even '*') no more expensive than they are now.  (Of course, it\r
106 > would be good to know just how much overhead going through message IDs\r
107 > actually introduces.)\r
108 Non-text part: text/html\r
109 \r
110 \r
111 That would be awesome!\r
112 \r
113 Though I'd rather leave the plumbing to someone sufficiently capable,\r
114 so, if leaving libnotmuch hacking out of the equation, how would one go\r
115 about doing this?\r
116 \r
117 I (ignorantly) assume we'd get `notmuch-search-process-filter'\r
118 to append each line with an invisible field containing a list\r
119 of matching Message-Id's, presumably obtained via\r
120 `notmuch_thread_get_matched_messages' (@ lib/thread.cc) ?\r
121 \r
122 \r
123 Peace\r
124 \r
125 -- \r
126 Pieter\r