[PATCH v4 3/5] emacs: show: pass button to create-overlays
[notmuch-archives.git] / b7 / fa87cb9ccb80f2b10e098de38b72806ba26db7
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 22DD3429E25\r
6         for <notmuch@notmuchmail.org>; Mon, 15 Aug 2011 02:30:40 -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 BgKsHNdno4Gy for <notmuch@notmuchmail.org>;\r
16         Mon, 15 Aug 2011 02:30:38 -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 518C3431FB6\r
19         for <notmuch@notmuchmail.org>; Mon, 15 Aug 2011 02:30:38 -0700 (PDT)\r
20 Received: from localhost (unknown [192.168.200.4])\r
21         by max.feld.cvut.cz (Postfix) with ESMTP id B976D19F3332;\r
22         Mon, 15 Aug 2011 11:30: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 0-UA34-0UH4P; Mon, 15 Aug 2011 11:30: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 6497719F32DB;\r
30         Mon, 15 Aug 2011 11:30: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 35807FA003;\r
34         Mon, 15 Aug 2011 11:30: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 1QstVE-0002B0-1k; Mon, 15 Aug 2011 11:30:36 +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 3/3] lib: add gnulib get_date() based date range\r
41  search\r
42 In-Reply-To:\r
43  <8ed532337c898d9075bbce00a7b2aaf9f13283b0.1312964528.git.jani@nikula.org>\r
44 References: <cover.1312964528.git.jani@nikula.org>\r
45         <8ed532337c898d9075bbce00a7b2aaf9f13283b0.1312964528.git.jani@nikula.org>\r
46 User-Agent: Notmuch/0.6.1-91-g55c2c34 (http://notmuchmail.org) Emacs/23.3.1\r
47         (x86_64-pc-linux-gnu)\r
48 Date: Mon, 15 Aug 2011 11:30:36 +0200\r
49 Message-ID: <87aabbyqbn.fsf@steelpick.2x.cz>\r
50 MIME-Version: 1.0\r
51 Content-Type: text/plain; charset=us-ascii\r
52 Cc: amdragon@mit.edu\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Mon, 15 Aug 2011 09:30:40 -0000\r
66 \r
67 On Wed, 10 Aug 2011, Jani Nikula wrote:\r
68 > Add a custom value range processor to handle "date:" using get_date() from\r
69 > gnulib. This enables date (and time) searches of the form\r
70 > date:since..until, where "since" and "until" are expressions understood by\r
71 > get_date(), compatible with most GNU programs. For the date input formats,\r
72 > see the GNU coreutils manual:\r
73 > http://www.gnu.org/software/coreutils/manual/html_node/Date-input-formats.html\r
74\r
75 > Open-ended ranges are supported (since Xapian 1.2.1), i.e. you can specify\r
76 > date:..until or date:since.. to not limit the start or end date,\r
77 > respectively.\r
78\r
79 > Note: The get_date() function has been renamed to parse_datetime() in\r
80 > recent gnulib.\r
81\r
82 > EXAMPLES:\r
83\r
84 > date:2-weeks-ago..\r
85 > date:today00:00:00..\r
86 > date:yesterday00:00:00..today00:00:00\r
87 > date:07/14/2011..2011-07-15\r
88\r
89 > BUGS/CAVEATS:\r
90\r
91 > At the moment it seems search phrases with spaces in them are not supported\r
92 > in notmuch. For date: this means you can't specify a date with an\r
93 > expression with spaces in it. In many (but apparently not all) cases you\r
94 > can work around this by replacing spaces with '-' or simply leaving out\r
95 > whitespace. For example, date:2-days-ago..yesterday00:00:00.\r
96 \r
97 For other search operators you can quote the arguments. Doesn't that work\r
98 here as well? E.g. date:"2 days ago..". \r
99 \r
100\r
101 > For the purpose of searching mail, the get_date() implementation has some\r
102 > surprising interpretations. For example:\r
103\r
104 > * Any date specification without time, such as date:yesterday.. or\r
105 >   date:2011-08-10.., means that day at the same time as now (instead of\r
106 >   00:00:00).\r
107 \r
108 Yes, this is annoying. I think that the approach outlined in my previous\r
109 mail (id:87bovryqp0.fsf@steelpick.2x.cz) would solve this nicely.\r
110 \r
111 > * As a consequence, ranges such as date:yesterday..yesterday match just the\r
112 >   messages at the same time as now, to the second. The date parser should\r
113 >   optimally make different kind of interpretations depending on whether\r
114 >   parsing "since" or "until". For example, date:today..today should cover\r
115 >   the whole day from beginning to end, date:today00:00:00..today23:59:59.\r
116\r
117 > * date:monday.. means date:next-monday.. (rather than date:last-monday..)\r
118\r
119 > * date:this-week.. really means date:now.. (you probably want\r
120 >   date:1-week-ago-next-monday00:00:00.. or similar).\r
121 \r
122 I looked into that in the past and found the place where it can be\r
123 changed, but as you point out below, we would lose compatibility with\r
124 GNU and we would need to test it. I believe that writing a new parser\r
125 that is more tailored to email searching is better then reusing date\r
126 parser for things it was not intended for.\r
127 \r
128 -Michal\r
129 \r
130\r
131 > However, there is value in being compatible with GNU programs, and the\r
132 > input formats have been rather well documented. It would be more surprising\r
133 > to deviate from that, and it would also take some effort to do so,\r
134 > including testing.\r