[PATCH v2 2/5] emacs: Utilities to manage asynchronous notmuch processes
[notmuch-archives.git] / 47 / e77a59c3b8a81624a8c652e9c749515f3cf976
1 Return-Path: <sojka@os.inf.tu-dresden.de>\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 995BF429E25\r
6         for <notmuch@notmuchmail.org>; Mon, 15 Aug 2011 02:22:39 -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\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         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 L5kln7g25Hrg for <notmuch@notmuchmail.org>;\r
16         Mon, 15 Aug 2011 02:22:39 -0700 (PDT)\r
17 Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
18         by olra.theworths.org (Postfix) with ESMTP id CAA0B431FB6\r
19         for <notmuch@notmuchmail.org>; Mon, 15 Aug 2011 02:22:38 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id B2A743CFE75;\r
22         Mon, 15 Aug 2011 11:22:37 +0200 (CEST)\r
23 X-Virus-Scanned: IMAP AMAVIS\r
24 Received: from max.feld.cvut.cz ([192.168.200.1])\r
25         by localhost (styx.feld.cvut.cz [192.168.200.4]) (amavisd-new,\r
26         port 10044)\r
27         with ESMTP id tb4+lsJZbyVU; Mon, 15 Aug 2011 11:22:36 +0200 (CEST)\r
28 Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
29         by max.feld.cvut.cz (Postfix) with ESMTP id AAEAB3CFE72;\r
30         Mon, 15 Aug 2011 11:22:36 +0200 (CEST)\r
31 Received: from steelpick.2x.cz (unknown [141.76.49.12])\r
32         (Authenticated sender: sojkam1)\r
33         by imap.feld.cvut.cz (Postfix) with ESMTPSA id 10993FA003;\r
34         Mon, 15 Aug 2011 11:22:36 +0200 (CEST)\r
35 Received: from wsh by steelpick.2x.cz with local (Exim 4.76)\r
36         (envelope-from <sojka@os.inf.tu-dresden.de>)\r
37         id 1QstNT-00029v-Tl; Mon, 15 Aug 2011 11:22:35 +0200\r
38 From: Michal Sojka <sojkam1@fel.cvut.cz>\r
39 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
40 Subject: Re: [RFC PATCH 0/3] add user friendly date range search\r
41 In-Reply-To: <cover.1312964528.git.jani@nikula.org>\r
42 References: <cover.1312964528.git.jani@nikula.org>\r
43 User-Agent: Notmuch/0.6.1-91-g55c2c34 (http://notmuchmail.org) Emacs/23.3.1\r
44         (x86_64-pc-linux-gnu)\r
45 Date: Mon, 15 Aug 2011 11:22:35 +0200\r
46 Message-ID: <87bovryqp0.fsf@steelpick.2x.cz>\r
47 MIME-Version: 1.0\r
48 Content-Type: text/plain; charset=us-ascii\r
49 Cc: amdragon@mit.edu\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Mon, 15 Aug 2011 09:22:39 -0000\r
63 \r
64 Hi Jani,\r
65 \r
66 On Wed, 10 Aug 2011, Jani Nikula wrote:\r
67 > Hi, this RFC series adds user friendly date range searches in notmuch.\r
68\r
69 > Patches 1 and 2 add the date/time parser from coreutils, and were posted to\r
70 > the list by Michal Sojka in January [1]. I picked them up from the\r
71 > date-parser branch of the git tree at [2]. These worked without\r
72 > modifications, so I didn't touch them.\r
73\r
74 > Patch 3 adds the actual date range searches on top of current\r
75 > master. Michal also posted a date search implementation, but it was based\r
76 > on Austin Clements' custom parser patches, which I haven't looked at. Also,\r
77 > this one uses date: range syntax rather than before: and after:, and I\r
78 > think Michal would agree on this one [3].\r
79 \r
80 Sure.\r
81 \r
82 > If the same parser is to be eventually included in notmuch, I'd prefer\r
83 > using the parse-datetime module [3] (get_date() was renamed) directly from\r
84 > gnulib [4], instead of coreutils or elsewhere that just imports from\r
85 > gnulib. Also, I think the gnulib module should be placed in a subdirectory\r
86 > rather than alongside all the notmuch lib files. However there are some\r
87 > complications in using parse-datetime, as gnulib modules heavily rely on\r
88 > autotools. Perhaps one option would be to build a separate library with\r
89 > autotools that has what we need from gnulib?\r
90 \r
91 If he include this parser, then we should definitely take it from\r
92 gunlib. I was not aware of gnulib.\r
93 \r
94 But, in the past I thought more about specifying dates in notmuch and\r
95 came to conclusion, that parse-datetime is probably not the best thing\r
96 to use for notmuch. The reason is that notmuch users are more interested\r
97 in date/time ranges than in individual date/times and this module parses\r
98 only individual date/times.\r
99 \r
100 I would simply like notmuch to show all mails from Monday when I say\r
101 notmuch search date:monday. With parse-datetime approach I would need to\r
102 say notmuch search date:monday..tuesday or more precisely\r
103 date:"monday 0:00..tuesday 0:00".\r
104 \r
105 I think that this could be implemented by having a parser that works\r
106 with ranges as primary objects. If user specifies date:range (e.g.\r
107 date:monday), the meaning would be:\r
108 \r
109   since range.start, until range.end\r
110 \r
111 If the user specifies date:range1..range2 (e.g. date:monday..wednesday),\r
112 then the meaning would be:\r
113 \r
114   since range1.start, until range2.end\r
115 \r
116 And of course, you could also have zero-length ranges to support\r
117 something like date:12:34:56..13:24:35.\r
118 \r
119 I think that this would match most closely the way how I want to search\r
120 emails by date. Thoughts?\r
121 \r
122 Unfortunately, I do not have time to implement this now so volunteers\r
123 are welcome.\r
124 \r
125 -Michal\r