[PATCH v6 8/9] man: document the date:since..until range queries
authorJani Nikula <jani@nikula.org>
Tue, 30 Oct 2012 20:32:39 +0000 (22:32 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:13 +0000 (09:50 -0800)
3a/74c5307fc3b8ff3e5492dd3ee646751fe74a05 [new file with mode: 0644]

diff --git a/3a/74c5307fc3b8ff3e5492dd3ee646751fe74a05 b/3a/74c5307fc3b8ff3e5492dd3ee646751fe74a05
new file mode 100644 (file)
index 0000000..6cc7c79
--- /dev/null
@@ -0,0 +1,252 @@
+Return-Path: <jani@nikula.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 66C7F431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 13:33:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 9-KCOwQUfdwm for <notmuch@notmuchmail.org>;\r
+       Tue, 30 Oct 2012 13:33:22 -0700 (PDT)\r
+Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com\r
+       [209.85.217.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 6AAE9429E32\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 13:33:11 -0700 (PDT)\r
+Received: by mail-lb0-f181.google.com with SMTP id gg6so567600lbb.26\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 13:33:10 -0700 (PDT)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+       d=google.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references\r
+       :in-reply-to:references:x-gm-message-state;\r
+       bh=ajPBPDRnTMDI8c8arNLk4NRjdk5CLVxmbgWXU+fR3Gk=;\r
+       b=mOwyN9s//csjVCPH5W4zMQEs00rqtM60ifmqFKaVJoOsVEHN+/mA+SfuwJdMS8m7kC\r
+       lZI0DBCBPFte0mT5W1XpjTbR8zYd7SooBJRDstJds1tRaj5YGjDUj3TZ0SpRjQspjtzW\r
+       3e4gVz71DG2oG7REj3isFWK8iuqI3NnW5DFJUEX7umL7hBeXeqE/japB5YgJKAVbtb0K\r
+       bB3dhUa/JEPO9Bl6orP8BzpE2WOzzACeYPuaPV1xeQIkt4ShBQ/hrUI7xX0BMIo92ROo\r
+       xA5VJqbrwCHt9KftQ/Vo689lwCSmKefi/ATsIPE/MCXqoVNsZ8fSASiwsn/k0cdJymiZ\r
+       0NiQ==\r
+Received: by 10.152.47.148 with SMTP id d20mr31320333lan.42.1351629190917;\r
+       Tue, 30 Oct 2012 13:33:10 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw4-fe51df00-27.dhcp.inet.fi.\r
+       [80.223.81.27])\r
+       by mx.google.com with ESMTPS id z9sm754739lbk.15.2012.10.30.13.33.09\r
+       (version=SSLv3 cipher=OTHER); Tue, 30 Oct 2012 13:33:10 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v6 8/9] man: document the date:since..until range queries\r
+Date: Tue, 30 Oct 2012 22:32:39 +0200\r
+Message-Id:\r
+ <88274590f0d652a3fc76e2b5185922b9f13c4d03.1351626272.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <cover.1351626272.git.jani@nikula.org>\r
+References: <cover.1351626272.git.jani@nikula.org>\r
+In-Reply-To: <cover.1351626272.git.jani@nikula.org>\r
+References: <cover.1351626272.git.jani@nikula.org>\r
+X-Gm-Message-State:\r
+ ALoCoQk4PzetRN6AP/zCSF1flbAU09P1ChtMMmEIf0jjCZBDrra6ZOHBmEX+Dhde8y/iV7WZnuq3\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 30 Oct 2012 20:33:24 -0000\r
+\r
+---\r
+ man/man7/notmuch-search-terms.7 |  150 +++++++++++++++++++++++++++++++++++----\r
+ 1 file changed, 138 insertions(+), 12 deletions(-)\r
+\r
+diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7\r
+index 17a109e..e39b944 100644\r
+--- a/man/man7/notmuch-search-terms.7\r
++++ b/man/man7/notmuch-search-terms.7\r
+@@ -54,6 +54,8 @@ terms to match against specific portions of an email, (where\r
+ \r
+       folder:<directory-path>\r
+ \r
++      date:<since>..<until>\r
++\r
+ The\r
+ .B from:\r
+ prefix is used to match the name or address of the sender of an email\r
+@@ -104,6 +106,26 @@ contained within particular directories within the mail store. Only\r
+ the directory components below the top-level mail database path are\r
+ available to be searched.\r
+ \r
++The\r
++.B date:\r
++prefix can be used to restrict the results to only messages within a\r
++particular time range (based on the Date: header) with a range syntax\r
++of:\r
++\r
++      date:<since>..<until>\r
++\r
++See \fBDATE AND TIME SEARCH\fR below for details on the range\r
++expression, and supported syntax for <since> and <until> date and time\r
++expressions.\r
++\r
++The time range can also be specified using timestamps with a syntax\r
++of:\r
++\r
++      <initial-timestamp>..<final-timestamp>\r
++\r
++Each timestamp is a number representing the number of seconds since\r
++1970\-01\-01 00:00:00 UTC.\r
++\r
+ In addition to individual terms, multiple terms can be\r
+ combined with Boolean operators (\r
+ .BR and ", " or ", " not\r
+@@ -117,20 +139,124 @@ operators, but will have to be protected from interpretation by the\r
+ shell, (such as by putting quotation marks around any parenthesized\r
+ expression).\r
+ \r
+-Finally, results can be restricted to only messages within a\r
+-particular time range, (based on the Date: header) with a syntax of:\r
++.SH DATE AND TIME SEARCH\r
+ \r
+-      <initial-timestamp>..<final-timestamp>\r
++notmuch understands a variety of standard and natural ways of\r
++expressing dates and times, both in absolute terms ("2012-10-24") and\r
++in relative terms ("yesterday"). Any number of relative terms can be\r
++combined ("1 hour 25 minutes") and an absolute date/time can be\r
++combined with relative terms to further adjust it. A non-exhaustive\r
++description of the syntax supported for absolute and relative terms is\r
++given below.\r
+ \r
+-Each timestamp is a number representing the number of seconds since\r
+-1970\-01\-01 00:00:00 UTC. This is not the most convenient means of\r
+-expressing date ranges, but until notmuch is fixed to accept a more\r
+-convenient form, one can use the date program to construct\r
+-timestamps. For example, with the bash shell the following syntax would\r
+-specify a date range to return messages from 2009\-10\-01 until the\r
+-current time:\r
+-\r
+-      $(date +%s \-d 2009\-10\-01)..$(date +%s)\r
++.RS 4\r
++.TP 4\r
++.B The range expression\r
++\r
++date:<since>..<until>\r
++\r
++The above expression restricts the results to only messages from\r
++<since> to <until>, based on the Date: header.\r
++\r
++<since> and <until> can describe imprecise times, such as "yesterday".\r
++In this case, <since> is taken as the earliest time it could describe\r
++(the beginning of yesterday) and <until> is taken as the latest time\r
++it could describe (the end of yesterday). Similarly,\r
++date:january..february matches from the beginning of January to the\r
++end of February.\r
++\r
++Currently, we do not support spaces in range expressions. You can\r
++replace the spaces with '_', or (in most cases) '-', or (in some\r
++cases) leave the spaces out altogether. Examples in this man page use\r
++spaces for clarity.\r
++\r
++Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's\r
++possible to specify date:..<until> or date:<since>.. to not limit the\r
++start or end time, respectively. Pre-1.2.1 Xapian does not report an\r
++error on open ended ranges, but it does not work as expected either.\r
++\r
++Entering date:expr without ".." (for example date:yesterday) won't\r
++work, as it's not interpreted as a range expression at all. You can\r
++achieve the expected result by duplicating the expr both sides of ".."\r
++(for example date:yesterday..yesterday).\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Relative date and time\r
++[N|number] (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]\r
++\r
++All refer to past, can be repeated and will be accumulated.\r
++\r
++Units can be abbreviated to any length, with the otherwise ambiguous\r
++single m being m for minutes and M for months.\r
++\r
++Number can also be written out one, two, ..., ten, dozen,\r
++hundred. Additionally, the unit may be preceded by "last" or "this"\r
++(e.g., "last week" or "this month").\r
++\r
++When combined with absolute date and time, the relative date and time\r
++specification will be relative from the specified absolute date and\r
++time.\r
++\r
++Examples: 5M2d, two weeks\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Supported absolute time formats\r
++H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
++\r
++H[H] (am|a.m.|pm|p.m.)\r
++\r
++HHMMSS\r
++\r
++now\r
++\r
++noon\r
++\r
++midnight\r
++\r
++Examples: 17:05, 5pm\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Supported absolute date formats\r
++YYYY-MM[-DD]\r
++\r
++DD-MM[-[YY]YY]\r
++\r
++MM-YYYY\r
++\r
++M[M]/D[D][/[YY]YY]\r
++\r
++M[M]/YYYY\r
++\r
++D[D].M[M][.[YY]YY]\r
++\r
++D[D][(st|nd|rd|th)] Mon[thname] [YYYY]\r
++\r
++Mon[thname] D[D][(st|nd|rd|th)] [YYYY]\r
++\r
++Wee[kday]\r
++\r
++Month names can be abbreviated at three or more characters.\r
++\r
++Weekday names can be abbreviated at three or more characters.\r
++\r
++Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3\r
++.RE\r
++\r
++.RS 4\r
++.TP 4\r
++.B Time zones\r
++(+|-)HH:MM\r
++\r
++(+|-)HH[MM]\r
++\r
++Some time zone codes, e.g. UTC, EET.\r
++.RE\r
+ \r
+ .SH SEE ALSO\r
+ \r
+-- \r
+1.7.10.4\r
+\r