--- /dev/null
+Return-Path: <bremner@tethera.net>\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 DB833431FBF\r
+ for <notmuch@notmuchmail.org>; Wed, 24 Apr 2013 18:20:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+ 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 w5XpVVlrd0ez for <notmuch@notmuchmail.org>;\r
+ Wed, 24 Apr 2013 18:19:55 -0700 (PDT)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+ (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 9F0C4431FAF\r
+ for <notmuch@notmuchmail.org>; Wed, 24 Apr 2013 18:19:50 -0700 (PDT)\r
+Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+ ([156.34.82.78] helo=zancas.localnet)\r
+ by tesseract.cs.unb.ca with esmtpsa\r
+ (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1UVAqd-0002Tx-9Q; Wed, 24 Apr 2013 22:19:49 -0300\r
+Received: from bremner by zancas.localnet with local (Exim 4.80)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1UVAqX-000144-NH; Wed, 24 Apr 2013 22:19:37 -0300\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [RFC Patch v2 2/3] man: partial conversion to pod.\r
+Date: Wed, 24 Apr 2013 22:19:11 -0300\r
+Message-Id: <1366852752-3584-3-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.8.2.rc2\r
+In-Reply-To: <1366852752-3584-1-git-send-email-david@tethera.net>\r
+References: <1362882151-14030-1-git-send-email-david@tethera.net>\r
+ <1366852752-3584-1-git-send-email-david@tethera.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=UTF-8\r
+Content-Transfer-Encoding: 8bit\r
+X-Spam_bar: -\r
+Cc: David Bremner <bremner@debian.org>\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: Thu, 25 Apr 2013 01:20:01 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+This allows generation of man page and info document from the same source.\r
+It is also a bit more friendly to edit for most people.\r
+\r
+The conversion was done as follows:\r
+\r
+ % groff -e -mandoc -Tascii -rHY=0 $* | rman -f POD | sed -e '/./,/^$/!d' -e 's/\r
+\r
+Some small hand-editing of the .pod may be needed afterwards.\r
+---\r
+ INSTALL | 6 +\r
+ configure | 12 ++\r
+ info/Makefile.local | 25 +++-\r
+ man/Makefile.local | 19 ++-\r
+ man/man1/notmuch.1 | 184 ---------------------------\r
+ man/man7/notmuch-search-terms.7 | 266 ----------------------------------------\r
+ pod/notmuch-search-terms.pod | 233 +++++++++++++++++++++++++++++++++++\r
+ pod/notmuch.pod | 149 ++++++++++++++++++++++\r
+ 8 files changed, 440 insertions(+), 454 deletions(-)\r
+ delete mode 100644 man/man1/notmuch.1\r
+ delete mode 100644 man/man7/notmuch-search-terms.7\r
+ create mode 100644 pod/notmuch-search-terms.pod\r
+ create mode 100644 pod/notmuch.pod\r
+\r
+diff --git a/INSTALL b/INSTALL\r
+index 451bf05..697b7b2 100644\r
+--- a/INSTALL\r
++++ b/INSTALL\r
+@@ -60,6 +60,12 @@ Talloc which are each described below:\r
+ \r
+ Talloc is available from http://talloc.samba.org/\r
+ \r
++ pod2man\r
++ -------\r
++\r
++ Some of the documentation is built with pod2man. This is part\r
++ of the standard Perl distribution since Perl 5.6.0\r
++\r
+ texinfo\r
+ -------\r
+ \r
+diff --git a/configure b/configure\r
+index 5243f6a..a0c53e2 100755\r
+--- a/configure\r
++++ b/configure\r
+@@ -371,6 +371,15 @@ else\r
+ have_emacs=0\r
+ fi\r
+ \r
++printf "Checking for pod2man... "\r
++if pod2man --help > /dev/null 2>&1; then\r
++ printf "Yes.\n"\r
++ have_pod2man=1\r
++else\r
++ printf "No (man page install may fail)\n"\r
++ have_pod2man=0\r
++fi\r
++\r
+ printf "Checking for makeinfo... "\r
+ if makeinfo --version > /dev/null 2>&1; then\r
+ printf "Yes.\n"\r
+@@ -687,6 +696,9 @@ HAVE_MAKEINFO = ${have_makeinfo}\r
+ # Whether there's an install-info binary available\r
+ HAVE_INSTALLINFO = ${have_installinfo}\r
+ \r
++# Is pod2man in the path?\r
++HAVE_POD2MAN = ${have_pod2man}\r
++\r
+ # where to install info files\r
+ \r
+ INFODIR = ${INFODIR}\r
+diff --git a/info/Makefile.local b/info/Makefile.local\r
+index 55e9740..cca891a 100644\r
+--- a/info/Makefile.local\r
++++ b/info/Makefile.local\r
+@@ -2,10 +2,14 @@\r
+ \r
+ dir := info\r
+ \r
++man_texi := $(dir)/notmuch.texi $(dir)/notmuch-search-terms.texi\r
++man_info := $(man_texi:.texi=.info)\r
++man_entry := $(man_texi:.texi=.entry)\r
++\r
+ texi_sources := $(dir)/notmuch-emacs.texi\r
+ emacs_info := $(texi_sources:.texi=.info)\r
+ \r
+-info := $(emacs_info)\r
++info := $(emacs_info) $(man_info)\r
+ \r
+ ifeq ($(HAVE_MAKEINFO),1)\r
+ all: $(info)\r
+@@ -15,11 +19,23 @@ ifeq ($(HAVE_INSTALLINFO),1)\r
+ install: install-info\r
+ endif\r
+ \r
+-%.info: %.texi\r
++%.entry: ../pod/%.pod\r
++ printf "@dircategory Notmuch\n@direntry\n" > $@\r
++ printf "* %s: (%s). " $(*F) $(*F) >> $@\r
++ podselect -section Name $< | \\r
++ perl -n -e 's/notmuch.* - (.*)/\u\L$$1/ && print' >> $@\r
++ printf "@end direntry\n" >> $@\r
++\r
++%.info: %.texi %.entry\r
+ makeinfo --no-split -o $@ $<\r
+ \r
+ $(dir)/notmuch-emacs.info: $(dir)/notmuch-emacs.texi $(dir)/version.texi\r
+ \r
++%.texi: ../pod/%.pod\r
++ # a nasty hack, but the nicer ways seem to have bugs.\r
++ pod2texi $< | \\r
++ sed 's/@node Top/@include $(*F).entry\n@node Top/' > $@\r
++\r
+ .PHONY: $(dir)/version.texi\r
+ $(dir)/version.texi: version\r
+ printf "@set VERSION ${VERSION}\n" > $@\r
+@@ -29,5 +45,8 @@ install-info: ${info}\r
+ mkdir -p "$(DESTDIR)$(INFODIR)"\r
+ install -m0644 $(info) "$(DESTDIR)$(INFODIR)"\r
+ install-info --section=Notmuch --info-dir=${DESTDIR}${INFODIR} $(emacs_info)\r
++ for ifile in $(man_info); do \\r
++ install-info --info-dir=${DESTDIR}${INFODIR} $${ifile}; \\r
++ done\r
+ \r
+-CLEAN := $(CLEAN) $(info)\r
++CLEAN := $(CLEAN) $(info) $(man_entry) $(dir)/version.texi\r
+diff --git a/man/Makefile.local b/man/Makefile.local\r
+index 72e2a18..ceb5063 100644\r
+--- a/man/Makefile.local\r
++++ b/man/Makefile.local\r
+@@ -21,6 +21,8 @@ MAN1 := \\r
+ MAN5 := $(dir)/man5/notmuch-hooks.5\r
+ MAN7 := $(dir)/man7/notmuch-search-terms.7\r
+ \r
++GENERATED_MAN := $(MAIN_PAGE) $(MAN7)\r
++\r
+ MAN1_GZ := $(addsuffix .gz,$(MAN1))\r
+ MAN5_GZ := $(addsuffix .gz,$(MAN5))\r
+ MAN7_GZ := $(addsuffix .gz,$(MAN7))\r
+@@ -32,6 +34,21 @@ COMPRESSED_MAN := $(MAN1_GZ) $(MAN5_GZ) $(MAN7_GZ)\r
+ %.gz: %\r
+ gzip --stdout $^ > $@\r
+ \r
++POD2MAN_RECIPE = mkdir -p $(@D) && \\r
++ pod2man --section=$(subst .,,$(suffix $@)) \\r
++ --center="Notmuch Documentation" --release=${VERSION} $< > $@\r
++\r
++$(dir)/man1/%.1: $(dir)/../pod/%.pod\r
++ $(POD2MAN_RECIPE)\r
++\r
++$(dir)/man5/%.5: $(dir)/../pod/%.pod\r
++ $(POD2MAN_RECIPE)\r
++\r
++$(dir)/man7/%.7: $(dir)/../pod/%.pod\r
++ $(POD2MAN_RECIPE)\r
++\r
++CLEAN := $(CLEAN) $(NROFF7)\r
++\r
+ .PHONY: install-man update-man-versions\r
+ \r
+ install-man: $(COMPRESSED_MAN)\r
+@@ -50,4 +67,4 @@ update-man-versions: $(MAN_SOURCE)\r
+ < $$file.bak > $$file; \\r
+ done\r
+ \r
+-CLEAN := $(CLEAN) $(COMPRESSED_MAN) $(MAN_BACKUP)\r
++CLEAN := $(CLEAN) $(COMPRESSED_MAN) $(MAN_BACKUP) $(GENERATED_MAN)\r
+diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1\r
+deleted file mode 100644\r
+index 923fefe..0000000\r
+--- a/man/man1/notmuch.1\r
++++ /dev/null\r
+@@ -1,184 +0,0 @@\r
+-.\" notmuch - Not much of an email program, (just index, search and tagging)\r
+-.\"\r
+-.\" Copyright © 2009 Carl Worth\r
+-.\"\r
+-.\" Notmuch is free software: you can redistribute it and/or modify\r
+-.\" it under the terms of the GNU General Public License as published by\r
+-.\" the Free Software Foundation, either version 3 of the License, or\r
+-.\" (at your option) any later version.\r
+-.\"\r
+-.\" Notmuch is distributed in the hope that it will be useful,\r
+-.\" but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+-.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r
+-.\" GNU General Public License for more details.\r
+-.\"\r
+-.\" You should have received a copy of the GNU General Public License\r
+-.\" along with this program. If not, see http://www.gnu.org/licenses/ .\r
+-.\"\r
+-.\" Author: Carl Worth <cworth@cworth.org>\r
+-.TH NOTMUCH 1 2013-02-17 "Notmuch 0.15.2"\r
+-.SH NAME\r
+-notmuch \- thread-based email index, search, and tagging\r
+-.SH SYNOPSIS\r
+-.B notmuch\r
+-.RI "[" option " ...] " command " [" arg " ...]"\r
+-.SH DESCRIPTION\r
+-Notmuch is a command-line based program for indexing, searching,\r
+-reading, and tagging large collections of email messages.\r
+-\r
+-This page describes how to get started using notmuch from the command\r
+-line, and gives a brief overview of the commands available. For more\r
+-information on e.g.\r
+-.B notmuch show\r
+-consult the \fBnotmuch-show\fR(1) man page, also accessible via\r
+-.B notmuch help show\r
+-\r
+-The quickest way to get started with Notmuch is to simply invoke the\r
+-.B notmuch\r
+-command with no arguments, which will interactively guide you through\r
+-the process of indexing your mail.\r
+-.SH NOTE\r
+-While the command-line program\r
+-.B notmuch\r
+-provides powerful functionality, it does not provide the most\r
+-convenient interface for that functionality. More sophisticated\r
+-interfaces are expected to be built on top of either the command-line\r
+-interface, or more likely, on top of the notmuch library\r
+-interface. See http://notmuchmail.org for more about alternate\r
+-interfaces to notmuch. The emacs-based interface to notmuch (available under\r
+-.B emacs/\r
+-in the Notmuch source distribution) is probably the most widely used at\r
+-this time.\r
+-\r
+-.SH OPTIONS\r
+-\r
+-Supported global options for\r
+-.B notmuch\r
+-include\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-help\r
+-\r
+-Print a synopsis of available commands and exit.\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-version\r
+-\r
+-Print the installed version of notmuch, and exit.\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-config=FILE\r
+-\r
+-Specify the configuration file to use. This overrides any\r
+-configuration file specified by ${NOTMUCH_CONFIG}.\r
+-\r
+-.RE\r
+-\r
+-.SH COMMANDS\r
+-\r
+-\r
+-.SS SETUP\r
+-\r
+-The\r
+-.B notmuch setup\r
+-command is used to configure Notmuch for first use, (or to reconfigure\r
+-it later).\r
+-\r
+-The setup command will prompt for your full name, your primary email\r
+-address, any alternate email addresses you use, and the directory\r
+-containing your email archives. Your answers will be written to a\r
+-configuration file in ${NOTMUCH_CONFIG} (if set) or\r
+-${HOME}/.notmuch-config . This configuration file will be created with\r
+-descriptive comments, making it easy to edit by hand later to change the\r
+-configuration. Or you can run\r
+-.B "notmuch setup"\r
+-again to change the configuration.\r
+-\r
+-The mail directory you specify can contain any number of\r
+-sub-directories and should primarily contain only files with individual\r
+-email messages (eg. maildir or mh archives are perfect). If there are\r
+-other, non-email files (such as indexes maintained by other email\r
+-programs) then notmuch will do its best to detect those and ignore\r
+-them.\r
+-\r
+-Mail storage that uses mbox format, (where one mbox file contains many\r
+-messages), will not work with notmuch. If that's how your mail is\r
+-currently stored, it is recommended you first convert it to maildir\r
+-format with a utility such as mb2md before running\r
+-.B "notmuch setup" .\r
+-\r
+-Invoking\r
+-.B notmuch\r
+-with no command argument will run\r
+-.B setup\r
+-if the setup command has not previously been completed.\r
+-.RE\r
+-\r
+-.SS OTHER COMMANDS\r
+-\r
+-Several of the notmuch commands accept search terms with a common\r
+-syntax. See \fNnotmuch-search-terms\fR(7)\r
+-for more details on the supported syntax.\r
+-\r
+-The\r
+-.BR search ", " show " and " count\r
+-commands are used to query the email database.\r
+-\r
+-The\r
+-.B reply\r
+-command is useful for preparing a template for an email reply.\r
+-\r
+-The\r
+-.B tag\r
+-command is the only command available for manipulating database\r
+-contents.\r
+-\r
+-\r
+-The\r
+-.BR dump " and " restore\r
+-commands can be used to create a textual dump of email tags for backup\r
+-purposes, and to restore from that dump.\r
+-\r
+-The\r
+-.B config\r
+-command can be used to get or set settings int the notmuch\r
+-configuration file.\r
+-\r
+-.SH ENVIRONMENT\r
+-The following environment variables can be used to control the\r
+-behavior of notmuch.\r
+-.TP\r
+-.B NOTMUCH_CONFIG\r
+-Specifies the location of the notmuch configuration file. Notmuch will\r
+-use ${HOME}/.notmuch\-config if this variable is not set.\r
+-\r
+-.TP\r
+-.B NOTMUCH_TALLOC_REPORT\r
+-Location to write a talloc memory usage report. See\r
+-.B talloc_enable_leak_report_full\r
+-in \fBtalloc\fR(3)\r
+-for more information.\r
+-\r
+-.SH SEE ALSO\r
+-\r
+-\fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),\r
+-\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),\r
+-\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),\r
+-\fBnotmuch-search\fR(1), \fBnotmuch-search-terms\fR(7),\r
+-\fBnotmuch-show\fR(1), \fBnotmuch-tag\fR(1)\r
+-\r
+-\r
+-The notmuch website:\r
+-.B http://notmuchmail.org\r
+-.SH CONTACT\r
+-Feel free to send questions, comments, or kudos to the notmuch mailing\r
+-list <notmuch@notmuchmail.org> . Subscription is not required before\r
+-posting, but is available from the notmuchmail.org website.\r
+-\r
+-Real-time interaction with the Notmuch community is available via IRC\r
+-(server: irc.freenode.net, channel: #notmuch).\r
+diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7\r
+deleted file mode 100644\r
+index eb417ba..0000000\r
+--- a/man/man7/notmuch-search-terms.7\r
++++ /dev/null\r
+@@ -1,266 +0,0 @@\r
+-.TH NOTMUCH-SEARCH-TERMS 7 2013-02-17 "Notmuch 0.15.2"\r
+-\r
+-.SH NAME\r
+-notmuch-search-terms \- syntax for notmuch queries\r
+-\r
+-.SH SYNOPSIS\r
+-\r
+-.B notmuch count\r
+-.RI [ options... ]\r
+-.RI < search-term ">..."\r
+-\r
+-.B "notmuch dump"\r
+-.RI "[ <" filename "> ] [--]"\r
+-.RI "[ <" search-term ">...]"\r
+-\r
+-.B notmuch search\r
+-.RI [ options "...] <" search-term ">..."\r
+-\r
+-.B notmuch show\r
+-.RI "[" options "...] <" search-term ">..."\r
+-\r
+-.B notmuch tag\r
+-.RI "+<" tag> "|\-<" tag "> [...] [\-\-] <" search-term ">..."\r
+-\r
+-\r
+-.SH DESCRIPTION\r
+-Several notmuch commands accept a common syntax for search terms.\r
+-\r
+-The search terms can consist of free-form text (and quoted phrases)\r
+-which will match all messages that contain all of the given\r
+-terms/phrases in the body, the subject, or any of the sender or\r
+-recipient headers.\r
+-\r
+-As a special case, a search string consisting of exactly a single\r
+-asterisk ("*") will match all messages.\r
+-\r
+-In addition to free text, the following prefixes can be used to force\r
+-terms to match against specific portions of an email, (where\r
+-<brackets> indicate user-supplied values):\r
+-\r
+- from:<name-or-address>\r
+-\r
+- to:<name-or-address>\r
+-\r
+- subject:<word-or-quoted-phrase>\r
+-\r
+- attachment:<word>\r
+-\r
+- tag:<tag> (or is:<tag>)\r
+-\r
+- id:<message-id>\r
+-\r
+- thread:<thread-id>\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
+-message.\r
+-\r
+-The\r
+-.B to:\r
+-prefix is used to match the names or addresses of any recipient of an\r
+-email message, (whether To, Cc, or Bcc).\r
+-\r
+-Any term prefixed with\r
+-.B subject:\r
+-will match only text from the subject of an email. Searching for a\r
+-phrase in the subject is supported by including quotation marks around\r
+-the phrase, immediately following\r
+-.BR subject: .\r
+-\r
+-The\r
+-.B attachment:\r
+-prefix can be used to search for specific filenames (or extensions) of\r
+-attachments to email messages.\r
+-\r
+-For\r
+-.BR tag: " and " is:\r
+-valid tag values include\r
+-.BR inbox " and " unread\r
+-by default for new messages added by\r
+-.B notmuch new\r
+-as well as any other tag values added manually with\r
+-.BR "notmuch tag" .\r
+-\r
+-For\r
+-.BR id: ,\r
+-message ID values are the literal contents of the Message\-ID: header\r
+-of email messages, but without the '<', '>' delimiters.\r
+-\r
+-The\r
+-.B thread:\r
+-prefix can be used with the thread ID values that are generated\r
+-internally by notmuch (and do not appear in email messages). These\r
+-thread ID values can be seen in the first column of output from\r
+-.B "notmuch search"\r
+-\r
+-The\r
+-.B folder:\r
+-prefix can be used to search for email message files that are\r
+-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
+-, etc.). Each term in the query will be implicitly connected by a\r
+-logical AND if no explicit operator is provided, (except that terms\r
+-with a common prefix will be implicitly combined with OR until we get\r
+-Xapian defect #402 fixed).\r
+-\r
+-Parentheses can also be used to control the combination of the Boolean\r
+-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
+-.SH DATE AND TIME SEARCH\r
+-\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
+-.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
+-\fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),\r
+-\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),\r
+-\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),\r
+-\fBnotmuch-search\fR(1), \fBnotmuch-show\fR(1), \fBnotmuch-tag\fR(1)\r
+diff --git a/pod/notmuch-search-terms.pod b/pod/notmuch-search-terms.pod\r
+new file mode 100644\r
+index 0000000..d1122b9\r
+--- /dev/null\r
++++ b/pod/notmuch-search-terms.pod\r
+@@ -0,0 +1,233 @@\r
++=head1 Name\r
++\r
++notmuch-search-terms - syntax for notmuch queries\r
++\r
++=head1 Synopsis\r
++\r
++B<notmuch> B<count> [I<options...>] <I<search-term>>...\r
++\r
++B<notmuch> B<dump> [ <I<filename>> ] [--] [ <I<search-term>>...]\r
++\r
++B<notmuch> B<search> [I<options>...] <I<search-term>>...\r
++\r
++B<notmuch> B<show> [I<options>...] <I<search-term>>...\r
++\r
++B<notmuch> B<tag> +<I<tag>>|-<I<tag>> [...] [--] <I<search-term>>...\r
++\r
++=head1 Description\r
++\r
++Several notmuch commands accept a common syntax for search terms.\r
++\r
++The search terms can consist of free-form text (and quoted phrases)\r
++which will match all messages that contain all of the given\r
++terms/phrases in the body, the subject, or any of the sender or\r
++recipient headers.\r
++\r
++As a special case, a search string consisting of exactly a single\r
++asterisk ("*") will match all messages.\r
++\r
++In addition to free text, the following prefixes can be used to force\r
++terms to match against specific portions of an email, (where <brackets>\r
++indicate user-supplied values):\r
++\r
++from:<name-or-address>\r
++\r
++to:<name-or-address>\r
++\r
++subject:<word-or-quoted-phrase>\r
++\r
++attachment:<word>\r
++\r
++tag:<tag> (or is:<tag>)\r
++\r
++id:<message-id>\r
++\r
++thread:<thread-id>\r
++\r
++folder:<directory-path>\r
++\r
++date:<since>..<until>\r
++\r
++The B<from:> prefix is used to match the name or address of the sender of\r
++an email message.\r
++\r
++The B<to:> prefix is used to match the names or addresses of any recipient\r
++of an email message, (whether To, Cc, or Bcc).\r
++\r
++Any term prefixed with B<subject:> will match only text from the subject\r
++of an email. Searching for a phrase in the subject is supported by\r
++including quotation marks around the phrase, immediately following\r
++B<subject:>.\r
++\r
++The B<attachment:> prefix can be used to search for specific filenames (or\r
++extensions) of attachments to email messages.\r
++\r
++For B<tag:> and B<is:> valid tag values include B<inbox> and B<unread> by default\r
++for new messages added by B<notmuch> B<new> as well as any other tag values\r
++added manually with B<notmuch> B<tag>.\r
++\r
++For B<id:>, message ID values are the literal contents of the Message-ID:\r
++header of email messages, but without the `<', `>' delimiters.\r
++\r
++The B<thread:> prefix can be used with the thread ID values that are\r
++generated internally by notmuch (and do not appear in email messages).\r
++These thread ID values can be seen in the first column of output from\r
++B<notmuch> B<search>\r
++\r
++The B<folder:> prefix can be used to search for email message files that\r
++are 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 B<date:> prefix can be used to restrict the results to only messages\r
++within a particular time range (based on the Date: header) with a range\r
++syntax of:\r
++\r
++date:<since>..<until>\r
++\r
++See B<DATE> B<AND> B<TIME> B<SEARCH> below for details on the range expression, and\r
++supported syntax for <since> and <until> date and time expressions.\r
++\r
++The time range can also be specified using timestamps with a syntax 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 combined with\r
++Boolean operators ( B<and>, B<or>, B<not> , etc.). Each term in the query will\r
++be implicitly connected by a logical AND if no explicit operator is\r
++provided, (except that terms with a common prefix will be implicitly\r
++combined with OR until we get Xapian defect #402 fixed).\r
++\r
++Parentheses can also be used to control the combination of the Boolean\r
++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
++=head1 Date and Time Search\r
++\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
++B<The> B<range> B<expression>\r
++\r
++date:<since>..<until>\r
++\r
++The above expression restricts the results to only messages\r
++from <since> to <until>, based on the Date: header.\r
++\r
++<since> and <until> can describe imprecise times, such as\r
++"yesterday". In this case, <since> is taken as the earliest\r
++time it could describe (the beginning of yesterday) and <until>\r
++is taken as the latest time it could describe (the end of\r
++yesterday). Similarly, date:january..february matches from the\r
++beginning of January to the end of February.\r
++\r
++Currently, we do not support spaces in range expressions. You\r
++can replace the spaces with `_', or (in most cases) `-', or (in\r
++some cases) leave the spaces out altogether. Examples in this\r
++man page use 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\r
++limit the start or end time, respectively. Pre-1.2.1 Xapian\r
++does not report an error on open ended ranges, but it does not\r
++work as expected either.\r
++\r
++Entering date:expr without ".." (for example date:yesterday)\r
++won't work, as it's not interpreted as a range expression at\r
++all. You can achieve the expected result by duplicating the\r
++expr both sides of ".." (for example\r
++date:yesterday..yesterday).\r
++\r
++B<Relative> B<date> B<and> B<time>\r
++[N|number]\r
++(years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs)\r
++[...]\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\r
++ambiguous 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\r
++"this" (e.g., "last week" or "this month").\r
++\r
++When combined with absolute date and time, the relative date\r
++and time specification will be relative from the specified\r
++absolute date and time.\r
++\r
++Examples: 5M2d, two weeks\r
++\r
++B<Supported> B<absolute> B<time> B<formats>\r
++H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
++\r
++H[H] (am|a.m.|pm|p.m.)\r
++\r
++=over 5\r
++\r
++=item HHMMSS\r
++\r
++=back\r
++\r
++now\r
++\r
++noon\r
++\r
++midnight\r
++\r
++Examples: 17:05, 5pm\r
++\r
++B<Supported> B<absolute> B<date> B<formats>\r
++YYYY-MM[-DD]\r
++\r
++=over 5\r
++\r
++=item DD-MM[-[YY]YY]\r
++\r
++=item MM-YYYY\r
++\r
++=item M[M]/D[D][/[YY]YY]\r
++\r
++=item M[M]/YYYY\r
++\r
++=item D[D].M[M][.[YY]YY]\r
++\r
++=back\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
++\r
++B<Time> B<zones>\r
++(+|-)HH:MM\r
++\r
++=over 5\r
++\r
++=item (+|-)HH[MM]\r
++\r
++=back\r
++\r
++Some time zone codes, e.g. UTC, EET.\r
++\r
++=head1 See Also\r
++\r
++L<notmuch(1)>, L<notmuch-config(1)>, L<notmuch-count(1)>, L<notmuch-dump(1)>,\r
++L<notmuch-hooks(5)>, L<notmuch-new(1)>, L<notmuch-reply(1)>, L<notmuch-restore(1)>,\r
++L<notmuch-search(1)>, L<notmuch-show(1)>, L<notmuch-tag(1)>\r
+diff --git a/pod/notmuch.pod b/pod/notmuch.pod\r
+new file mode 100644\r
+index 0000000..3407211\r
+--- /dev/null\r
++++ b/pod/notmuch.pod\r
+@@ -0,0 +1,149 @@\r
++=head1 Name\r
++\r
++notmuch - thread-based email index, search, and tagging\r
++\r
++=head1 Synopsis\r
++\r
++B<notmuch> [I<option> ...] I<command> [I<arg> ...]\r
++\r
++=head1 Description\r
++\r
++Notmuch is a command-line based program for indexing, searching,\r
++reading, and tagging large collections of email messages.\r
++\r
++This page describes how to get started using notmuch from the command\r
++line, and gives a brief overview of the commands available. For more\r
++information on e.g. B<notmuch> B<show> consult the L<notmuch-show(1)> man page,\r
++also accessible via B<notmuch> B<help> B<show>\r
++\r
++The quickest way to get started with Notmuch is to simply invoke the\r
++B<notmuch> command with no arguments, which will interactively guide you\r
++through the process of indexing your mail.\r
++\r
++=head1 Note\r
++\r
++While the command-line program B<notmuch> provides powerful functionality,\r
++it does not provide the most convenient interface for that\r
++functionality. More sophisticated interfaces are expected to be built\r
++on top of either the command-line interface, or more likely, on top of\r
++the notmuch library interface. See http://notmuchmail.org for more\r
++about alternate interfaces to notmuch. The emacs-based interface to\r
++notmuch (available under B<emacs/> in the Notmuch source distribution) is\r
++probably the most widely used at this time.\r
++\r
++=head1 Options\r
++\r
++Supported global options for B<notmuch> include\r
++\r
++=over 5\r
++\r
++=item B<--help>\r
++\r
++=back\r
++\r
++Print a synopsis of available commands and exit.\r
++\r
++=over 5\r
++\r
++=item B<--version>\r
++\r
++=back\r
++\r
++Print the installed version of notmuch, and exit.\r
++\r
++=over 5\r
++\r
++=item B<--config=FILE>\r
++\r
++=back\r
++\r
++Specify the configuration file to use. This overrides any\r
++configuration file specified by ${NOTMUCH_CONFIG}.\r
++\r
++=head1 Commands\r
++\r
++B<SETUP>\r
++The B<notmuch> B<setup> command is used to configure Notmuch for first use,\r
++(or to reconfigure it later).\r
++\r
++The setup command will prompt for your full name, your primary email\r
++address, any alternate email addresses you use, and the directory\r
++containing your email archives. Your answers will be written to a\r
++configuration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-\r
++config . This configuration file will be created with descriptive\r
++comments, making it easy to edit by hand later to change the\r
++configuration. Or you can run B<notmuch> B<setup> again to change the\r
++configuration.\r
++\r
++The mail directory you specify can contain any number of sub-\r
++directories and should primarily contain only files with individual\r
++email messages (eg. maildir or mh archives are perfect). If there are\r
++other, non-email files (such as indexes maintained by other email\r
++programs) then notmuch will do its best to detect those and ignore\r
++them.\r
++\r
++Mail storage that uses mbox format, (where one mbox file contains many\r
++messages), will not work with notmuch. If that's how your mail is\r
++currently stored, it is recommended you first convert it to maildir\r
++format with a utility such as mb2md before running B<notmuch> B<setup> B<.>\r
++\r
++Invoking B<notmuch> with no command argument will run B<setup> if the setup\r
++command has not previously been completed.\r
++\r
++B<OTHER> B<COMMANDS>\r
++Several of the notmuch commands accept search terms with a common\r
++syntax. See L<notmuch-search-terms(7)> for more details on the supported\r
++syntax.\r
++\r
++The B<search>, B<show> and B<count> commands are used to query the email\r
++database.\r
++\r
++The B<reply> command is useful for preparing a template for an email\r
++reply.\r
++\r
++The B<tag> command is the only command available for manipulating database\r
++contents.\r
++\r
++The B<dump> and B<restore> commands can be used to create a textual dump of\r
++email tags for backup purposes, and to restore from that dump.\r
++\r
++The B<config> command can be used to get or set settings int the notmuch\r
++configuration file.\r
++\r
++=head1 Environment\r
++\r
++The following environment variables can be used to control the behavior\r
++of notmuch.\r
++\r
++=over 5\r
++\r
++=item B<NOTMUCH_CONFIG>\r
++\r
++Specifies the location of the notmuch configuration file.\r
++Notmuch will use ${HOME}/.notmuch-config if this variable is not\r
++set.\r
++\r
++=item B<NOTMUCH_TALLOC_REPORT>\r
++\r
++Location to write a talloc memory usage report. See\r
++B<talloc_enable_leak_report_full> in L<talloc(3)> for more\r
++information.\r
++\r
++=back\r
++\r
++=head1 See Also\r
++\r
++L<notmuch-config(1)>, L<notmuch-count(1)>, L<notmuch-dump(1)>, L<notmuch-hooks(5)>,\r
++L<notmuch-new(1)>, L<notmuch-reply(1)>, L<notmuch-restore(1)>, L<notmuchsearch(1)>,\r
++L<notmuch-search-terms(7)>, L<notmuch-show(1)>, L<notmuch-tag(1)>\r
++\r
++The notmuch website: B<http://notmuchmail.org>\r
++\r
++=head1 Contact\r
++\r
++Feel free to send questions, comments, or kudos to the notmuch mailing\r
++list <notmuch@notmuchmail.org> . Subscription is not required before\r
++posting, but is available from the notmuchmail.org website.\r
++\r
++Real-time interaction with the Notmuch community is available via IRC\r
++(server: irc.freenode.net, channel: #notmuch).\r
+-- \r
+1.8.2.rc2\r
+\r