Re: [PATCH v4 08/16] reorganize indexing of multipart/signed and multipart/encrypted
[notmuch-archives.git] / 3a / 74c5307fc3b8ff3e5492dd3ee646751fe74a05
1 Return-Path: <jani@nikula.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 66C7F431FAF\r
6         for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 13:33:24 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
9 X-Spam-Flag: NO\r
10 X-Spam-Score: -0.7\r
11 X-Spam-Level: \r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
13         tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 9-KCOwQUfdwm for <notmuch@notmuchmail.org>;\r
17         Tue, 30 Oct 2012 13:33:22 -0700 (PDT)\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
19         [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 6AAE9429E32\r
22         for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 13:33:11 -0700 (PDT)\r
23 Received: by mail-lb0-f181.google.com with SMTP id gg6so567600lbb.26\r
24         for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 13:33:10 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=google.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
28         :in-reply-to:references:x-gm-message-state;\r
29         bh=ajPBPDRnTMDI8c8arNLk4NRjdk5CLVxmbgWXU+fR3Gk=;\r
30         b=mOwyN9s//csjVCPH5W4zMQEs00rqtM60ifmqFKaVJoOsVEHN+/mA+SfuwJdMS8m7kC\r
31         lZI0DBCBPFte0mT5W1XpjTbR8zYd7SooBJRDstJds1tRaj5YGjDUj3TZ0SpRjQspjtzW\r
32         3e4gVz71DG2oG7REj3isFWK8iuqI3NnW5DFJUEX7umL7hBeXeqE/japB5YgJKAVbtb0K\r
33         bB3dhUa/JEPO9Bl6orP8BzpE2WOzzACeYPuaPV1xeQIkt4ShBQ/hrUI7xX0BMIo92ROo\r
34         xA5VJqbrwCHt9KftQ/Vo689lwCSmKefi/ATsIPE/MCXqoVNsZ8fSASiwsn/k0cdJymiZ\r
35         0NiQ==\r
36 Received: by 10.152.47.148 with SMTP id d20mr31320333lan.42.1351629190917;\r
37         Tue, 30 Oct 2012 13:33:10 -0700 (PDT)\r
38 Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
39         [80.223.81.27])\r
40         by mx.google.com with ESMTPS id z9sm754739lbk.15.2012.10.30.13.33.09\r
41         (version=SSLv3 cipher=OTHER); Tue, 30 Oct 2012 13:33:10 -0700 (PDT)\r
42 From: Jani Nikula <jani@nikula.org>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v6 8/9] man: document the date:since..until range queries\r
45 Date: Tue, 30 Oct 2012 22:32:39 +0200\r
46 Message-Id:\r
47  <88274590f0d652a3fc76e2b5185922b9f13c4d03.1351626272.git.jani@nikula.org>\r
48 X-Mailer: git-send-email 1.7.10.4\r
49 In-Reply-To: <cover.1351626272.git.jani@nikula.org>\r
50 References: <cover.1351626272.git.jani@nikula.org>\r
51 In-Reply-To: <cover.1351626272.git.jani@nikula.org>\r
52 References: <cover.1351626272.git.jani@nikula.org>\r
53 X-Gm-Message-State:\r
54  ALoCoQk4PzetRN6AP/zCSF1flbAU09P1ChtMMmEIf0jjCZBDrra6ZOHBmEX+Dhde8y/iV7WZnuq3\r
55 X-BeenThere: notmuch@notmuchmail.org\r
56 X-Mailman-Version: 2.1.13\r
57 Precedence: list\r
58 List-Id: "Use and development of the notmuch mail system."\r
59         <notmuch.notmuchmail.org>\r
60 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
62 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
63 List-Post: <mailto:notmuch@notmuchmail.org>\r
64 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
65 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
66         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
67 X-List-Received-Date: Tue, 30 Oct 2012 20:33:24 -0000\r
68 \r
69 ---\r
70  man/man7/notmuch-search-terms.7 |  150 +++++++++++++++++++++++++++++++++++----\r
71  1 file changed, 138 insertions(+), 12 deletions(-)\r
72 \r
73 diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7\r
74 index 17a109e..e39b944 100644\r
75 --- a/man/man7/notmuch-search-terms.7\r
76 +++ b/man/man7/notmuch-search-terms.7\r
77 @@ -54,6 +54,8 @@ terms to match against specific portions of an email, (where\r
78  \r
79         folder:<directory-path>\r
80  \r
81 +       date:<since>..<until>\r
82 +\r
83  The\r
84  .B from:\r
85  prefix is used to match the name or address of the sender of an email\r
86 @@ -104,6 +106,26 @@ contained within particular directories within the mail store. Only\r
87  the directory components below the top-level mail database path are\r
88  available to be searched.\r
89  \r
90 +The\r
91 +.B date:\r
92 +prefix can be used to restrict the results to only messages within a\r
93 +particular time range (based on the Date: header) with a range syntax\r
94 +of:\r
95 +\r
96 +       date:<since>..<until>\r
97 +\r
98 +See \fBDATE AND TIME SEARCH\fR below for details on the range\r
99 +expression, and supported syntax for <since> and <until> date and time\r
100 +expressions.\r
101 +\r
102 +The time range can also be specified using timestamps with a syntax\r
103 +of:\r
104 +\r
105 +       <initial-timestamp>..<final-timestamp>\r
106 +\r
107 +Each timestamp is a number representing the number of seconds since\r
108 +1970\-01\-01 00:00:00 UTC.\r
109 +\r
110  In addition to individual terms, multiple terms can be\r
111  combined with Boolean operators (\r
112  .BR and ", " or ", " not\r
113 @@ -117,20 +139,124 @@ operators, but will have to be protected from interpretation by the\r
114  shell, (such as by putting quotation marks around any parenthesized\r
115  expression).\r
116  \r
117 -Finally, results can be restricted to only messages within a\r
118 -particular time range, (based on the Date: header) with a syntax of:\r
119 +.SH DATE AND TIME SEARCH\r
120  \r
121 -       <initial-timestamp>..<final-timestamp>\r
122 +notmuch understands a variety of standard and natural ways of\r
123 +expressing dates and times, both in absolute terms ("2012-10-24") and\r
124 +in relative terms ("yesterday"). Any number of relative terms can be\r
125 +combined ("1 hour 25 minutes") and an absolute date/time can be\r
126 +combined with relative terms to further adjust it. A non-exhaustive\r
127 +description of the syntax supported for absolute and relative terms is\r
128 +given below.\r
129  \r
130 -Each timestamp is a number representing the number of seconds since\r
131 -1970\-01\-01 00:00:00 UTC. This is not the most convenient means of\r
132 -expressing date ranges, but until notmuch is fixed to accept a more\r
133 -convenient form, one can use the date program to construct\r
134 -timestamps. For example, with the bash shell the following syntax would\r
135 -specify a date range to return messages from 2009\-10\-01 until the\r
136 -current time:\r
137 -\r
138 -       $(date +%s \-d 2009\-10\-01)..$(date +%s)\r
139 +.RS 4\r
140 +.TP 4\r
141 +.B The range expression\r
142 +\r
143 +date:<since>..<until>\r
144 +\r
145 +The above expression restricts the results to only messages from\r
146 +<since> to <until>, based on the Date: header.\r
147 +\r
148 +<since> and <until> can describe imprecise times, such as "yesterday".\r
149 +In this case, <since> is taken as the earliest time it could describe\r
150 +(the beginning of yesterday) and <until> is taken as the latest time\r
151 +it could describe (the end of yesterday). Similarly,\r
152 +date:january..february matches from the beginning of January to the\r
153 +end of February.\r
154 +\r
155 +Currently, we do not support spaces in range expressions. You can\r
156 +replace the spaces with '_', or (in most cases) '-', or (in some\r
157 +cases) leave the spaces out altogether. Examples in this man page use\r
158 +spaces for clarity.\r
159 +\r
160 +Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's\r
161 +possible to specify date:..<until> or date:<since>.. to not limit the\r
162 +start or end time, respectively. Pre-1.2.1 Xapian does not report an\r
163 +error on open ended ranges, but it does not work as expected either.\r
164 +\r
165 +Entering date:expr without ".." (for example date:yesterday) won't\r
166 +work, as it's not interpreted as a range expression at all. You can\r
167 +achieve the expected result by duplicating the expr both sides of ".."\r
168 +(for example date:yesterday..yesterday).\r
169 +.RE\r
170 +\r
171 +.RS 4\r
172 +.TP 4\r
173 +.B Relative date and time\r
174 +[N|number] (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]\r
175 +\r
176 +All refer to past, can be repeated and will be accumulated.\r
177 +\r
178 +Units can be abbreviated to any length, with the otherwise ambiguous\r
179 +single m being m for minutes and M for months.\r
180 +\r
181 +Number can also be written out one, two, ..., ten, dozen,\r
182 +hundred. Additionally, the unit may be preceded by "last" or "this"\r
183 +(e.g., "last week" or "this month").\r
184 +\r
185 +When combined with absolute date and time, the relative date and time\r
186 +specification will be relative from the specified absolute date and\r
187 +time.\r
188 +\r
189 +Examples: 5M2d, two weeks\r
190 +.RE\r
191 +\r
192 +.RS 4\r
193 +.TP 4\r
194 +.B Supported absolute time formats\r
195 +H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
196 +\r
197 +H[H] (am|a.m.|pm|p.m.)\r
198 +\r
199 +HHMMSS\r
200 +\r
201 +now\r
202 +\r
203 +noon\r
204 +\r
205 +midnight\r
206 +\r
207 +Examples: 17:05, 5pm\r
208 +.RE\r
209 +\r
210 +.RS 4\r
211 +.TP 4\r
212 +.B Supported absolute date formats\r
213 +YYYY-MM[-DD]\r
214 +\r
215 +DD-MM[-[YY]YY]\r
216 +\r
217 +MM-YYYY\r
218 +\r
219 +M[M]/D[D][/[YY]YY]\r
220 +\r
221 +M[M]/YYYY\r
222 +\r
223 +D[D].M[M][.[YY]YY]\r
224 +\r
225 +D[D][(st|nd|rd|th)] Mon[thname] [YYYY]\r
226 +\r
227 +Mon[thname] D[D][(st|nd|rd|th)] [YYYY]\r
228 +\r
229 +Wee[kday]\r
230 +\r
231 +Month names can be abbreviated at three or more characters.\r
232 +\r
233 +Weekday names can be abbreviated at three or more characters.\r
234 +\r
235 +Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3\r
236 +.RE\r
237 +\r
238 +.RS 4\r
239 +.TP 4\r
240 +.B Time zones\r
241 +(+|-)HH:MM\r
242 +\r
243 +(+|-)HH[MM]\r
244 +\r
245 +Some time zone codes, e.g. UTC, EET.\r
246 +.RE\r
247  \r
248  .SH SEE ALSO\r
249  \r
250 -- \r
251 1.7.10.4\r
252 \r