[PATCH 3/4] Add rules to build notmuch.1 and notmuch-help.h from the pod file.
authordavid <david@tethera.net>
Wed, 3 Nov 2010 17:18:55 +0000 (14:18 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:21 +0000 (09:37 -0800)
94/a79434d00f2a7d27378b8ca957adcc514e6d6d [new file with mode: 0644]

diff --git a/94/a79434d00f2a7d27378b8ca957adcc514e6d6d b/94/a79434d00f2a7d27378b8ca957adcc514e6d6d
new file mode 100644 (file)
index 0000000..dc5d535
--- /dev/null
@@ -0,0 +1,726 @@
+Return-Path: <bremner@unb.ca>\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 3403D4196F0\r
+       for <notmuch@notmuchmail.org>; Wed,  3 Nov 2010 10:20:06 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.6\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham\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 l4Ha-TNoO0yj for <notmuch@notmuchmail.org>;\r
+       Wed,  3 Nov 2010 10:19:53 -0700 (PDT)\r
+Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
+       (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 12AF340D14D\r
+       for <notmuch@notmuchmail.org>; Wed,  3 Nov 2010 10:19:36 -0700 (PDT)\r
+Received: from rocinante.cs.unb.ca\r
+       (fctnnbsc30w-142167176217.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
+       [142.167.176.217]) (authenticated bits=0)\r
+       by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id oA3HJYdT014337\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);\r
+       Wed, 3 Nov 2010 14:19:34 -0300\r
+Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.72)\r
+       (envelope-from <bremner@unb.ca>)\r
+       id 1PDgzm-0001P2-93; Wed, 03 Nov 2010 14:19:34 -0300\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 3/4] Add rules to build notmuch.1 and notmuch-help.h from the\r
+       pod file.\r
+Date: Wed,  3 Nov 2010 14:18:55 -0300\r
+Message-Id: <1288804736-5173-4-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To: <874oc4r4bu.fsf@yoom.home.cworth.org>\r
+References: <874oc4r4bu.fsf@yoom.home.cworth.org>\r
+Cc: David Bremner <bremner@unb.ca>\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: Wed, 03 Nov 2010 17:20:06 -0000\r
+\r
+From: David Bremner <bremner@unb.ca>\r
+\r
+Add generated files to CLEAN. Remove notmuch.1 from git because we\r
+auto generate it now.\r
+---\r
+ Makefile.local |   22 ++-\r
+ notmuch.1      |  609 --------------------------------------------------------\r
+ 2 files changed, 21 insertions(+), 610 deletions(-)\r
+ delete mode 100644 notmuch.1\r
+\r
+diff --git a/Makefile.local b/Makefile.local\r
+index 490265b..3e20d0c 100644\r
+--- a/Makefile.local\r
++++ b/Makefile.local\r
+@@ -251,6 +251,18 @@ notmuch_client_srcs =             \\r
+       show-message.c          \\r
+       json.c\r
\r
++notmuch_help_files= \\r
++      notmuch-setup-help.h    \\r
++      notmuch-new-help.h      \\r
++      notmuch-show-help.h     \\r
++      notmuch-search-help.h   \\r
++      notmuch-count-help.h    \\r
++      notmuch-reply-help.h    \\r
++      notmuch-tag-help.h      \\r
++      notmuch-dump-help.h     \\r
++      notmuch-restore-help.h  \\r
++      notmuch-part-help.h\r
++\r
+ notmuch_client_modules = $(notmuch_client_srcs:.c=.o)\r
\r
+ notmuch: $(notmuch_client_modules) lib/libnotmuch.a\r
+@@ -259,6 +271,14 @@ notmuch: $(notmuch_client_modules) lib/libnotmuch.a\r
+ notmuch-shared: $(notmuch_client_modules) lib/$(LINKER_NAME)\r
+       $(call quiet,$(FINAL_NOTMUCH_LINKER) $(CFLAGS)) $(notmuch_client_modules) $(FINAL_NOTMUCH_LDFLAGS) -o $@\r
\r
++notmuch.1: notmuch.pod\r
++      pod2man --stderr --center "User Commands" --release $(VERSION) $^ > $@\r
++\r
++notmuch.o: notmuch-help.h\r
++\r
++notmuch-help.h: notmuch.pod pod2help_h.pl\r
++      perl pod2help_h.pl < notmuch.pod > notmuch-help.h\r
++\r
+ notmuch.1.gz: notmuch.1\r
+       gzip --stdout $^ > $@\r
\r
+@@ -294,4 +314,4 @@ install-desktop:\r
+       desktop-file-install --mode 0644 --dir $(DESTDIR)$(desktop_dir) notmuch.desktop\r
\r
+ SRCS  := $(SRCS) $(notmuch_client_srcs)\r
+-CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc notmuch.1.gz\r
++CLEAN := $(CLEAN) notmuch notmuch-shared $(notmuch_client_modules) notmuch.elc notmuch.1.gz notmuch.1 notmuch-help.h\r
+diff --git a/notmuch.1 b/notmuch.1\r
+deleted file mode 100644\r
+index 2c33749..0000000\r
+--- a/notmuch.1\r
++++ /dev/null\r
+@@ -1,609 +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 2009-10-31 "Notmuch 0.1"\r
+-.SH NAME\r
+-notmuch \- thread-based email index, search, and tagging\r
+-.SH SYNOPSIS\r
+-.B notmuch\r
+-.IR command " [" args " ...]"\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
+-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.\r
+-.SH COMMANDS\r
+-The\r
+-.BR setup\r
+-command is used to configure Notmuch for first use, (or to reconfigure\r
+-it later).\r
+-.RS 4\r
+-.TP 4\r
+-.B setup\r
+-\r
+-Interactively sets up notmuch for first use.\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
+-The\r
+-.B new\r
+-command is used to incorporate new mail into the notmuch database.\r
+-.RS 4\r
+-.TP 4\r
+-.B new\r
+-\r
+-Find and import any new messages to the database.\r
+-\r
+-The\r
+-.B new\r
+-command scans all sub-directories of the database, performing\r
+-full-text indexing on new messages that are found. Each new message\r
+-will automatically be tagged with both the\r
+-.BR inbox " and " unread\r
+-tags.\r
+-\r
+-You should run\r
+-.B "notmuch new"\r
+-once after first running\r
+-.B "notmuch setup"\r
+-to create the initial database. The first run may take a long time if\r
+-you have a significant amount of mail (several hundred thousand\r
+-messages or more). Subsequently, you should run\r
+-.B "notmuch new"\r
+-whenever new mail is delivered and you wish to incorporate it into the\r
+-database. These subsequent runs will be much quicker than the initial\r
+-run.\r
+-\r
+-Invoking\r
+-.B notmuch\r
+-with no command argument will run\r
+-.B new\r
+-if\r
+-.B "notmuch setup"\r
+-has previously been completed, but\r
+-.B "notmuch new"\r
+-has not previously been run.\r
+-.RE\r
+-\r
+-Several of the notmuch commands accept search terms with a common\r
+-syntax. See the\r
+-.B "SEARCH SYNTAX"\r
+-section below 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
+-.RS 4\r
+-.TP 4\r
+-.BR search " [options...] <search-term>..."\r
+-\r
+-Search for messages matching the given search terms, and display as\r
+-results the threads containing the matched messages.\r
+-\r
+-The output consists of one line per thread, giving a thread ID, the\r
+-date of the newest (or oldest, depending on the sort option) matched\r
+-message in the thread, the number of matched messages and total\r
+-messages in the thread, the names of all participants in the thread,\r
+-and the subject of the newest (or oldest) message.\r
+-\r
+-Supported options for\r
+-.B search\r
+-include\r
+-.RS 4\r
+-.TP 4\r
+-.BR \-\-format= ( json | text )\r
+-\r
+-Presents the results in either JSON or plain-text (default).\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-output=(summary|threads|messages|files|tags)\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B summary\r
+-\r
+-Output a summary of each thread with any message matching the search\r
+-terms. The summary includes the thread ID, date, the number of\r
+-messages in the thread (both the number matched and the total number),\r
+-the authors of the thread and the subject.\r
+-.RE\r
+-.RS 4\r
+-.TP 4\r
+-.B threads\r
+-\r
+-Output the thread IDs of all threads with any message matching the\r
+-search terms, either one per line (--format=text) or as a JSON array\r
+-(--format=json).\r
+-.RE\r
+-.RS 4\r
+-.TP 4\r
+-.B messages\r
+-\r
+-Output the message IDs of all messages matching the search terms,\r
+-either one per line (--format=text) or as a JSON array\r
+-(--format=json).\r
+-.RE\r
+-.RS 4\r
+-.TP 4\r
+-.B files\r
+-\r
+-Output the filenames of all messages matching the search terms, either\r
+-one per line (--format=text) or as a JSON array (--format=json).\r
+-.RE\r
+-.RS 4\r
+-.TP 4\r
+-.B tags\r
+-\r
+-Output all tags that appear on any message matching the search terms,\r
+-either one per line (--format=text) or as a JSON array\r
+-(--format=json).\r
+-.RE\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.BR \-\-sort= ( newest\-first | oldest\-first )\r
+-\r
+-This option can be used to present results in either chronological order\r
+-.RB ( oldest\-first )\r
+-or reverse chronological order\r
+-.RB ( newest\-first ).\r
+-\r
+-Note: The thread order will be distinct between these two options\r
+-(beyond being simply reversed). When sorting by\r
+-.B oldest\-first\r
+-the threads will be sorted by the oldest message in each thread, but\r
+-when sorting by\r
+-.B newest\-first\r
+-the threads will be sorted by the newest message in each thread.\r
+-\r
+-.RE\r
+-.RS 4\r
+-By default, results will be displayed in reverse chronological order,\r
+-(that is, the newest results will be displayed first).\r
+-\r
+-See the\r
+-.B "SEARCH SYNTAX"\r
+-section below for details of the supported syntax for <search-terms>.\r
+-.RE\r
+-.TP\r
+-.BR show " [options...] <search-term>..."\r
+-\r
+-Shows all messages matching the search terms.\r
+-\r
+-The messages will be grouped and sorted based on the threading (all\r
+-replies to a particular message will appear immediately after that\r
+-message in date order). The output is not indented by default, but\r
+-depth tags are printed so that proper indentation can be performed by\r
+-a post-processor (such as the emacs interface to notmuch).\r
+-\r
+-Supported options for\r
+-.B show\r
+-include\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-entire\-thread\r
+-\r
+-By default only those messages that match the search terms will be\r
+-displayed. With this option, all messages in the same thread as any\r
+-matched message will be displayed.\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B \-\-format=(text|json|mbox)\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.B text\r
+-\r
+-The default plain-text format has all text-content MIME parts\r
+-decoded. Various components in the output,\r
+-.RB ( message ", " header ", " body ", " attachment ", and MIME " part ),\r
+-will be delimited by easily-parsed markers. Each marker consists of a\r
+-Control-L character (ASCII decimal 12), the name of the marker, and\r
+-then either an opening or closing brace, ('{' or '}'), to either open\r
+-or close the component.\r
+-.RE\r
+-.RS 4\r
+-.TP 4\r
+-.B json\r
+-\r
+-The output is formatted with Javascript Object Notation (JSON). This\r
+-format is more robust than the text format for automated\r
+-processing. JSON output always includes all messages in a matching\r
+-thread; in effect\r
+-.B \-\-format=json\r
+-implies\r
+-.B \-\-entire\-thread\r
+-\r
+-.RE\r
+-.RS 4\r
+-.TP 4\r
+-.B mbox\r
+-\r
+-All matching messages are output in the traditional, Unix mbox format\r
+-with each message being prefixed by a line beginning with "From " and\r
+-a blank line separating each message. Lines in the message content\r
+-beginning with "From " (preceded by zero or more '>' characters) have\r
+-an additional '>' character added. This reversible escaping\r
+-is termed "mboxrd" format and described in detail here:\r
+-http://homepage.ntlworld.com/jonathan.deboynepollard/FGA/mail-mbox-formats.html\r
+-.RE\r
+-A common use of\r
+-.B notmuch show\r
+-is to display a single thread of email messages. For this, use a\r
+-search term of "thread:<thread-id>" as can be seen in the first\r
+-column of output from the\r
+-.B notmuch search\r
+-command.\r
+-\r
+-See the\r
+-.B "SEARCH SYNTAX"\r
+-section below for details of the supported syntax for <search-terms>.\r
+-.RE\r
+-.TP\r
+-.BR count " <search-term>..."\r
+-\r
+-Count messages matching the search terms.\r
+-\r
+-The number of matching messages is output to stdout.\r
+-\r
+-With no search terms, a count of all messages in the database will be\r
+-displayed.\r
+-.RE\r
+-.RE\r
+-\r
+-The\r
+-.B reply\r
+-command is useful for preparing a template for an email reply.\r
+-.RS 4\r
+-.TP 4\r
+-.BR reply " [options...] <search-term>..."\r
+-\r
+-Constructs a reply template for a set of messages.\r
+-\r
+-To make replying to email easier,\r
+-.B notmuch reply\r
+-takes an existing set of messages and constructs a suitable mail\r
+-template. The Reply-to header (if any, otherwise From:) is used for\r
+-the To: address. Vales from the To: and Cc: headers are copied, but\r
+-not including any of the current user's email addresses (as configured\r
+-in primary_mail or other_email in the .notmuch\-config file) in the\r
+-recipient list\r
+-\r
+-It also builds a suitable new subject, including Re: at the front (if\r
+-not already present), and adding the message IDs of the messages being\r
+-replied to to the References list and setting the In\-Reply\-To: field\r
+-correctly.\r
+-\r
+-Finally, the original contents of the emails are quoted by prefixing\r
+-each line with '> ' and included in the body.\r
+-\r
+-The resulting message template is output to stdout.\r
+-\r
+-Supported options for\r
+-.B reply\r
+-include\r
+-.RS\r
+-.TP 4\r
+-.BR \-\-format= ( default | headers\-only )\r
+-.RS\r
+-.TP 4\r
+-.BR default\r
+-Includes subject and quoted message body.\r
+-.TP\r
+-.BR headers\-only\r
+-Only produces In\-Reply\-To, References, To, Cc, and Bcc headers.\r
+-.RE\r
+-\r
+-See the\r
+-.B "SEARCH SYNTAX"\r
+-section below for details of the supported syntax for <search-terms>.\r
+-\r
+-Note: It is most common to use\r
+-.B "notmuch reply"\r
+-with a search string matching a single message, (such as\r
+-id:<message-id>), but it can be useful to reply to several messages at\r
+-once. For example, when a series of patches are sent in a single\r
+-thread, replying to the entire thread allows for the reply to comment\r
+-on issue found in multiple patches.\r
+-.RE\r
+-.RE\r
+-\r
+-The\r
+-.B tag\r
+-command is the only command available for manipulating database\r
+-contents.\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.BR tag " +<tag>|\-<tag> [...] [\-\-] <search-term>..."\r
+-\r
+-Add/remove tags for all messages matching the search terms.\r
+-\r
+-Tags prefixed by '+' are added while those prefixed by '\-' are\r
+-removed. For each message, tag removal is performed before tag\r
+-addition.\r
+-\r
+-The beginning of <search-terms> is recognized by the first\r
+-argument that begins with neither '+' nor '\-'. Support for\r
+-an initial search term beginning with '+' or '\-' is provided\r
+-by allowing the user to specify a "\-\-" argument to separate\r
+-the tags from the search terms.\r
+-\r
+-See the\r
+-.B "SEARCH SYNTAX"\r
+-section below for details of the supported syntax for <search-terms>.\r
+-.RE\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
+-.RS 4\r
+-.TP 4\r
+-.BR dump " [<filename>]"\r
+-\r
+-Creates a plain-text dump of the tags of each message.\r
+-\r
+-The output is to the given filename, if any, or to stdout.\r
+-\r
+-These tags are the only data in the notmuch database that can't be\r
+-recreated from the messages themselves.  The output of notmuch dump is\r
+-therefore the only critical thing to backup (and much more friendly to\r
+-incremental backup than the native database files.)\r
+-.TP\r
+-.BR restore " <filename>"\r
+-\r
+-Restores the tags from the given file (see\r
+-.BR "notmuch dump" "."\r
+-\r
+-Note: The dump file format is specifically chosen to be\r
+-compatible with the format of files produced by sup-dump.\r
+-So if you've previously been using sup for mail, then the\r
+-.B "notmuch restore"\r
+-command provides you a way to import all of your tags (or labels as\r
+-sup calls them).\r
+-.RE\r
+-\r
+-The\r
+-.B part\r
+-command can used to output a single part of a multi-part MIME message.\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.BR part " \-\-part=<part-number> <search-term>..."\r
+-\r
+-Output a single MIME part of a message.\r
+-\r
+-A single decoded MIME part, with no encoding or framing, is output to\r
+-stdout. The search terms must match only a single message, otherwise\r
+-this command will fail.\r
+-\r
+-The part number should match the part "id" field output by the\r
+-"\-\-format=json" option of "notmuch show". If the message specified by\r
+-the search terms does not include a part with the specified "id" there\r
+-will be no output.\r
+-\r
+-See the\r
+-.B "SEARCH SYNTAX"\r
+-section below for details of the supported syntax for <search-terms>.\r
+-.RE\r
+-\r
+-The\r
+-.B config\r
+-command can be used to get or set settings int the notmuch\r
+-configuration file.\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.BR "config get " <section> . <item>\r
+-\r
+-The value of the specified configuration item is printed to stdout. If\r
+-the item has multiple values, each value is separated by a newline\r
+-character.\r
+-\r
+-Available configuration items include at least\r
+-\r
+-      database.path\r
+-\r
+-      user.name\r
+-\r
+-      user.primary_email\r
+-\r
+-      user.other_email\r
+-\r
+-      new.tags\r
+-.RE\r
+-\r
+-.RS 4\r
+-.TP 4\r
+-.BR "config set " <section> . "<item> [values ...]"\r
+-\r
+-The specified configuration item is set to the given value.  To\r
+-specify a multiple-value item, provide each value as a separate\r
+-command-line argument.\r
+-\r
+-If no values are provided, the specified configuration item will be\r
+-removed from the configuration file.\r
+-.RE\r
+-\r
+-.SH SEARCH SYNTAX\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
+-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
+-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
+-Finally, results can be restricted to only messages within a\r
+-particular time range, (based on the Date: header) with a syntax of:\r
+-\r
+-      <intial-timestamp>..<final-timestamp>\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 folowing 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
+-.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
+-.SH SEE ALSO\r
+-The emacs-based interface to notmuch (available as\r
+-.B notmuch.el\r
+-in the Notmuch distribution).\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
+-- \r
+1.7.1\r
+\r