Re: [PATCH v4 01/16] add util/search-path.{c, h} to test for executables in $PATH
[notmuch-archives.git] / f3 / 44a387e770f3891582af66b0ff71abe66012df
1 Return-Path: <polatel@gmail.com>\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 9DE4C431FAE\r
6         for <notmuch@notmuchmail.org>; Sat, 16 Jan 2010 11:11:03 -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: -1.781\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.781 tagged_above=-999 required=5 tests=[AWL=0.818,\r
12         BAYES_00=-2.599] autolearn=unavailable\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 EftOxBwgkvL7 for <notmuch@notmuchmail.org>;\r
16         Sat, 16 Jan 2010 11:11:03 -0800 (PST)\r
17 Received: from mail-ew0-f215.google.com (mail-ew0-f215.google.com\r
18         [209.85.219.215])\r
19         by olra.theworths.org (Postfix) with ESMTP id CA28D431FBC\r
20         for <notmuch@notmuchmail.org>; Sat, 16 Jan 2010 11:11:02 -0800 (PST)\r
21 Received: by ewy7 with SMTP id 7so2025686ewy.30\r
22         for <notmuch@notmuchmail.org>; Sat, 16 Jan 2010 11:11:01 -0800 (PST)\r
23 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
24         h=domainkey-signature:received:received:sender:date:from:to:cc\r
25         :subject:message-id:references:mime-version:content-type\r
26         :content-disposition:in-reply-to:user-agent;\r
27         bh=bbbVhnLXMFzunBzzSEwyyMQ1lv/wSuDcnWgND2nfQhA=;\r
28         b=JGe52hwzeFaXsXgurW3zuqlIOShcf3YQs8WegZ+uqA0nVOkegjnakOW40A+EI+wli9\r
29         tTPZVwM4i6TTynGetJe6YVfshdULbJGZOjlAP/bw5gy70YJNa45u+Z2rq+fh5e+OHYBt\r
30         GlYYWlKYJP3vDflAMAVEKmI1OdBpyCfj9Bisc=\r
31 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
32         h=sender:date:from:to:cc:subject:message-id:references:mime-version\r
33         :content-type:content-disposition:in-reply-to:user-agent;\r
34         b=LzP+KwNN7uS3spflJ6hfuPL0TZ3bIbeI+lSsFYKu/4c4sg4kCkp4KhoYh6TNwnJXI2\r
35         KoegMSx/MwLo3W2wUi3MXtzkPN05fwOd2jyvRTKgLU1i7aKVT23rGsv7bDZ1xGGIZqpC\r
36         r2NVDyUX8ZEklqORiamFYYjee+D/Rx3R/5fSM=\r
37 Received: by 10.213.24.24 with SMTP id t24mr1445993ebb.16.1263669060784;\r
38         Sat, 16 Jan 2010 11:11:00 -0800 (PST)\r
39 Received: from harikalardiyari ([78.179.49.34])\r
40         by mx.google.com with ESMTPS id 5sm4067831eyh.32.2010.01.16.11.10.57\r
41         (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
42         Sat, 16 Jan 2010 11:10:57 -0800 (PST)\r
43 Sender: Ali Polatel <polatel@gmail.com>\r
44 Date: Sat, 16 Jan 2010 21:10:55 +0200\r
45 From: Ali Polatel <alip@exherbo.org>\r
46 To: Carl Worth <cworth@cworth.org>\r
47 Message-ID: <20100116191055.GB11414@harikalardiyari>\r
48 References: <20100114084713.GA22273@harikalardiyari>\r
49         <87eilse1hg.fsf@yoom.home.cworth.org>\r
50         <20100115001600.GD25209@lapse.rw.madduck.net>\r
51         <87vdf3cd1y.fsf@yoom.home.cworth.org>\r
52         <20100115210934.GA12515@harikalardiyari>\r
53         <87r5prc64e.fsf@yoom.home.cworth.org>\r
54 MIME-Version: 1.0\r
55 Content-Type: multipart/signed; micalg=pgp-sha1;\r
56         protocol="application/pgp-signature"; boundary="TRYliJ5NKNqkz5bu"\r
57 Content-Disposition: inline\r
58 In-Reply-To: <87r5prc64e.fsf@yoom.home.cworth.org>\r
59 User-Agent: Mutt/1.5.20 (2009-06-14)\r
60 Cc: martin f krafft <madduck@madduck.net>, notmuch@notmuchmail.org\r
61 Subject: Re: [notmuch] Thoughts on notmuch and Lua\r
62 X-BeenThere: notmuch@notmuchmail.org\r
63 X-Mailman-Version: 2.1.13\r
64 Precedence: list\r
65 List-Id: "Use and development of the notmuch mail system."\r
66         <notmuch.notmuchmail.org>\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
70 List-Post: <mailto:notmuch@notmuchmail.org>\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
74 X-List-Received-Date: Sat, 16 Jan 2010 19:11:03 -0000\r
75 \r
76 \r
77 --TRYliJ5NKNqkz5bu\r
78 Content-Type: text/plain; charset=iso-8859-9\r
79 Content-Disposition: inline\r
80 Content-Transfer-Encoding: quoted-printable\r
81 \r
82 Carl Worth yazm=FD=FE:\r
83 > On Fri, 15 Jan 2010 23:09:34 +0200, Ali Polatel <alip@exherbo.org> wrote:\r
84 > > Carl Worth yazm=FD=FE:\r
85 > > > What do you think, Ali? Would an approach like that satisfy the things\r
86 > > > you had in mind for hooks?\r
87 > >=20\r
88 > > It might, here are some thoughts and questions to help you elaborate:\r
89 > >=20\r
90 > > - How will these scripts manipulate data?\r
91 > >   e.g.: A "tagger" script may get the new mail from stdin and print out\r
92 > >   the new tags which notmuch will read and apply to the message.\r
93 >=20\r
94 > This can happen with current notmuch entirely with no real "hook"\r
95 > support.\r
96 >=20\r
97 > We've talked about switching from default tags of "inbox" and "unread"\r
98 > to simply having new mail tagged with a "new" tag. So a "tagger" script\r
99 > could operate simply by doing a "notmuch search" for messages with the\r
100 > "new" tag and could iterate over the filenames to process actual\r
101 > messages. (We don't have support now for emitting just filenames from a\r
102 > "notmuch search", but we have patches for that, and I'll be applying one\r
103 > soon.)\r
104 >=20\r
105 \r
106 This is one of the reasons I wanted hook support in the beginning.\r
107 I'm looking forward to seeing this in notmuch.\r
108 \r
109 > So that's a taste for the "scriptability" I see in the current notmuch\r
110 > system that makes it really much more flexible than any "hooks"\r
111 > system. Additional flexibility comes from:\r
112 >=20\r
113 >   * User can run a script like this at any point---not merely when\r
114 >     messages are added.\r
115 >=20\r
116 >   * User script isn't restricted to dealing only with "new" messages,\r
117 >     but can act on any set of messages based on any search constraint,\r
118 >     (or even all messages in the database).\r
119 >=20\r
120 > The results can then be applied by simply calling "notmuch tag" as\r
121 > needed.\r
122 >=20\r
123 \r
124 +1. I totally agree.\r
125 \r
126 > And if there are any performance problems there we can fix them, (such\r
127 > as, perhaps we'll end up wanting this script to be able to invoke a\r
128 > single process for all of its tagging rather than calling "notmuch tag"\r
129 > over and over).\r
130 >=20\r
131 > >   A "search-filter" script may get search results from stdin and filter\r
132 > >   them. Just my initial thoughts.\r
133 >=20\r
134 > And how would this search functionality and filtering be different than\r
135 > the search functionality provided by notmuch itself?\r
136 >=20\r
137 \r
138 I accept, this search-filter idea is kinda stupid now that I think about\r
139 it.\r
140 \r
141 > I can think of at least a couple of ways it might be different:\r
142 >=20\r
143 >   1. It would be nice to be able to filter based on tags that are\r
144 >      present in a thread, though perhaps not present in any message\r
145 >      matching the original search.\r
146 >=20\r
147 >      An obvious application of this is the "thread muting" feature,\r
148 >      where once a message is tagged as "muted", no messages delivered to\r
149 >      that thread in the future will appear in the inbox.\r
150 >=20\r
151 >      This is a feature I'd like to put into the core of notmuch such\r
152 >      that one passes a query to match messages and then also a second\r
153 >      query to filter based on the collected tags in threads. Something\r
154 >      like:\r
155 >=20\r
156 >       notmuch search tag:inbox --filter=3D"not tag:muted"\r
157 >=20\r
158 \r
159 Looks like a good idea indeed.\r
160 \r
161 >  2. There are other details available at the thread level that are not\r
162 >     available at the level at which message-based searching happens.\r
163 >=20\r
164 >     A simple example of this would be the ability to search for threads\r
165 >     with a single message, (perhaps checking to ensure that all requests\r
166 >     had gotten at least one reply). But one can imagine more complex\r
167 >     things as well, "Show me all threads where ImportantPerson sent a\r
168 >     message and where I never replied in the thread."\r
169 >=20\r
170 >     For this kind of thing, I think we simply want to build on the\r
171 >     output of "notmuch search". The current output isn't very usable for\r
172 >     this, but with things like the structured json output, etc. (which,\r
173 >     again, I hope to be merging soon), it would be quite easy to write\r
174 >     new tools that accept that output and provide additional searching\r
175 >     and filtering, etc. And that tool could provide lua-based scripting\r
176 >     or whatever else is desired.\r
177 >=20\r
178 \r
179 Makes sense. Structured output would make things really simpler.\r
180 \r
181 > So my feeling is that if anything can live outside of notmuch, then it\r
182 > should, and should simply build on top of notmuch output. (And we should\r
183 > fix notmuch output to support that well.)\r
184 >=20\r
185 \r
186 Works for me, as long as it solves my problems and as I stated above I\r
187 think it will.\r
188 \r
189 > And anything that must live within notmuch (or is best supported there),\r
190 > we should see if we can't just make that a core part of notmuch itself,\r
191 > (such as the --filter option I showed above).\r
192 >=20\r
193 > I'm *still* not wanting to squelch any experimentation with embedding\r
194 > scripting languages inside notmuch, or anything else. I'm just still not\r
195 > seeing anything that requires this.\r
196 >=20\r
197 > Look at the amount of emacs-lisp code we've written, for example, and\r
198 > the various things it does, (hiding away citations, etc.). That's all\r
199 > "scripting code", but that sits easily on top of the existing notmuch\r
200 > command-line tool.\r
201 >=20\r
202 > I think I'd prefer to keep that nice clean boundary until we find\r
203 > something that really requires changing that. But, show me something\r
204 > really cool that requires it, and you might convince me. :-)\r
205 >=20\r
206 \r
207 I don't have anything in mind right now but when I do we can talk\r
208 further :)\r
209 \r
210 Thanks for the descriptive response, I really appreciate it.\r
211 \r
212 > -Carl\r
213 \r
214 --=20\r
215 Regards,\r
216 Ali Polatel\r
217 \r
218 --TRYliJ5NKNqkz5bu\r
219 Content-Type: application/pgp-signature\r
220 Content-Disposition: inline\r
221 \r
222 -----BEGIN PGP SIGNATURE-----\r
223 Version: GnuPG v2.0.14 (GNU/Linux)\r
224 \r
225 iEYEABECAAYFAktSDz8ACgkQQU4yORhF8iCI5QCgiWuF3wMh7Ub6t4aTpe2xXlr3\r
226 MUQAn1UcdvtlOfzHhvPhf4zJjneRKOZL\r
227 =yI3i\r
228 -----END PGP SIGNATURE-----\r
229 \r
230 --TRYliJ5NKNqkz5bu--\r