1 Return-Path: <bremner@tethera.net>
\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 2BBE1431FC4
\r
6 for <notmuch@notmuchmail.org>; Sun, 5 Jan 2014 03:39:56 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 lh1Zokgd5tDQ for <notmuch@notmuchmail.org>;
\r
16 Sun, 5 Jan 2014 03:39:48 -0800 (PST)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id D68EF431FCF
\r
21 for <notmuch@notmuchmail.org>; Sun, 5 Jan 2014 03:39:32 -0800 (PST)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <bremner@tethera.net>)
\r
24 id 1Vzm3I-0001YZ-Ee; Sun, 05 Jan 2014 07:39:32 -0400
\r
25 Received: (nullmailer pid 5369 invoked by uid 1000); Sun, 05 Jan 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: [PATCH 2/3] man: partial conversion to pod.
\r
30 Date: Sun, 5 Jan 2014 07:39:09 -0400
\r
31 Message-Id: <1388921950-5017-3-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 1.8.5.2
\r
33 In-Reply-To: <1388921950-5017-1-git-send-email-david@tethera.net>
\r
34 References: <1366852752-3584-1-git-send-email-david@tethera.net>
\r
35 <1388921950-5017-1-git-send-email-david@tethera.net>
\r
37 Content-Type: text/plain; charset=UTF-8
\r
38 Content-Transfer-Encoding: 8bit
\r
39 Cc: David Bremner <bremner@debian.org>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Sun, 05 Jan 2014 11:39:56 -0000
\r
54 From: David Bremner <bremner@debian.org>
\r
56 This allows generation of man page and info document from the same source.
\r
57 It is also a bit more friendly to edit for most people.
\r
59 The conversion was done as follows:
\r
61 % groff -e -mandoc -Tascii -rHY=0 $* | rman -f POD | sed -e '/./,/^$/!d' -e 's/
\r
63 Some small hand-editing of the .pod may be needed afterwards.
\r
67 info/Makefile.local | 25 +++-
\r
68 man/Makefile.local | 19 ++-
\r
69 man/man1/notmuch.1 | 190 ----------------------------
\r
70 man/man7/notmuch-search-terms.7 | 269 ----------------------------------------
\r
71 pod/notmuch-search-terms.pod | 235 +++++++++++++++++++++++++++++++++++
\r
72 pod/notmuch.pod | 155 +++++++++++++++++++++++
\r
73 8 files changed, 448 insertions(+), 463 deletions(-)
\r
74 delete mode 100644 man/man1/notmuch.1
\r
75 delete mode 100644 man/man7/notmuch-search-terms.7
\r
76 create mode 100644 pod/notmuch-search-terms.pod
\r
77 create mode 100644 pod/notmuch.pod
\r
79 diff --git a/INSTALL b/INSTALL
\r
80 index 451bf05..697b7b2 100644
\r
83 @@ -60,6 +60,12 @@ Talloc which are each described below:
\r
85 Talloc is available from http://talloc.samba.org/
\r
90 + Some of the documentation is built with pod2man. This is part
\r
91 + of the standard Perl distribution since Perl 5.6.0
\r
96 diff --git a/configure b/configure
\r
97 index e75c1d4..6dadbaa 100755
\r
100 @@ -389,6 +389,15 @@ else
\r
104 +printf "Checking for pod2man... "
\r
105 +if pod2man --help > /dev/null 2>&1; then
\r
109 + printf "No (man page install may fail)\n"
\r
113 printf "Checking for makeinfo... "
\r
114 if makeinfo --version > /dev/null 2>&1; then
\r
116 @@ -768,6 +777,9 @@ HAVE_MAKEINFO = ${have_makeinfo}
\r
117 # Whether there's an install-info binary available
\r
118 HAVE_INSTALLINFO = ${have_installinfo}
\r
120 +# Is pod2man in the path?
\r
121 +HAVE_POD2MAN = ${have_pod2man}
\r
123 # where to install info files
\r
125 INFODIR = ${INFODIR}
\r
126 diff --git a/info/Makefile.local b/info/Makefile.local
\r
127 index 55e9740..cca891a 100644
\r
128 --- a/info/Makefile.local
\r
129 +++ b/info/Makefile.local
\r
134 +man_texi := $(dir)/notmuch.texi $(dir)/notmuch-search-terms.texi
\r
135 +man_info := $(man_texi:.texi=.info)
\r
136 +man_entry := $(man_texi:.texi=.entry)
\r
138 texi_sources := $(dir)/notmuch-emacs.texi
\r
139 emacs_info := $(texi_sources:.texi=.info)
\r
141 -info := $(emacs_info)
\r
142 +info := $(emacs_info) $(man_info)
\r
144 ifeq ($(HAVE_MAKEINFO),1)
\r
146 @@ -15,11 +19,23 @@ ifeq ($(HAVE_INSTALLINFO),1)
\r
147 install: install-info
\r
151 +%.entry: ../pod/%.pod
\r
152 + printf "@dircategory Notmuch\n@direntry\n" > $@
\r
153 + printf "* %s: (%s). " $(*F) $(*F) >> $@
\r
154 + podselect -section Name $< | \
\r
155 + perl -n -e 's/notmuch.* - (.*)/\u\L$$1/ && print' >> $@
\r
156 + printf "@end direntry\n" >> $@
\r
158 +%.info: %.texi %.entry
\r
159 makeinfo --no-split -o $@ $<
\r
161 $(dir)/notmuch-emacs.info: $(dir)/notmuch-emacs.texi $(dir)/version.texi
\r
163 +%.texi: ../pod/%.pod
\r
164 + # a nasty hack, but the nicer ways seem to have bugs.
\r
166 + sed 's/@node Top/@include $(*F).entry\n@node Top/' > $@
\r
168 .PHONY: $(dir)/version.texi
\r
169 $(dir)/version.texi: version
\r
170 printf "@set VERSION ${VERSION}\n" > $@
\r
171 @@ -29,5 +45,8 @@ install-info: ${info}
\r
172 mkdir -p "$(DESTDIR)$(INFODIR)"
\r
173 install -m0644 $(info) "$(DESTDIR)$(INFODIR)"
\r
174 install-info --section=Notmuch --info-dir=${DESTDIR}${INFODIR} $(emacs_info)
\r
175 + for ifile in $(man_info); do \
\r
176 + install-info --info-dir=${DESTDIR}${INFODIR} $${ifile}; \
\r
179 -CLEAN := $(CLEAN) $(info)
\r
180 +CLEAN := $(CLEAN) $(info) $(man_entry) $(dir)/version.texi
\r
181 diff --git a/man/Makefile.local b/man/Makefile.local
\r
182 index 57910b7..91bef04 100644
\r
183 --- a/man/Makefile.local
\r
184 +++ b/man/Makefile.local
\r
185 @@ -23,6 +23,8 @@ MAN1 := \
\r
186 MAN5 := $(dir)/man5/notmuch-hooks.5
\r
187 MAN7 := $(dir)/man7/notmuch-search-terms.7
\r
189 +GENERATED_MAN := $(MAIN_PAGE) $(MAN7)
\r
191 MAN1_GZ := $(addsuffix .gz,$(MAN1))
\r
192 MAN5_GZ := $(addsuffix .gz,$(MAN5))
\r
193 MAN7_GZ := $(addsuffix .gz,$(MAN7))
\r
194 @@ -34,6 +36,21 @@ COMPRESSED_MAN := $(MAN1_GZ) $(MAN5_GZ) $(MAN7_GZ)
\r
196 gzip --stdout $^ > $@
\r
198 +POD2MAN_RECIPE = mkdir -p $(@D) && \
\r
199 + pod2man --section=$(subst .,,$(suffix $@)) \
\r
200 + --center="Notmuch Documentation" --release=${VERSION} $< > $@
\r
202 +$(dir)/man1/%.1: $(dir)/../pod/%.pod
\r
203 + $(POD2MAN_RECIPE)
\r
205 +$(dir)/man5/%.5: $(dir)/../pod/%.pod
\r
206 + $(POD2MAN_RECIPE)
\r
208 +$(dir)/man7/%.7: $(dir)/../pod/%.pod
\r
209 + $(POD2MAN_RECIPE)
\r
211 +CLEAN := $(CLEAN) $(NROFF7)
\r
213 .PHONY: install-man update-man-versions
\r
215 install-man: $(COMPRESSED_MAN)
\r
216 @@ -52,4 +69,4 @@ update-man-versions: $(MAN_SOURCE)
\r
217 < $$file.bak > $$file; \
\r
220 -CLEAN := $(CLEAN) $(COMPRESSED_MAN) $(MAN_BACKUP)
\r
221 +CLEAN := $(CLEAN) $(COMPRESSED_MAN) $(MAN_BACKUP) $(GENERATED_MAN)
\r
222 diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1
\r
223 deleted file mode 100644
\r
224 index 605b514..0000000
\r
225 --- a/man/man1/notmuch.1
\r
228 -.\" notmuch - Not much of an email program, (just index, search and tagging)
\r
230 -.\" Copyright © 2009 Carl Worth
\r
232 -.\" Notmuch is free software: you can redistribute it and/or modify
\r
233 -.\" it under the terms of the GNU General Public License as published by
\r
234 -.\" the Free Software Foundation, either version 3 of the License, or
\r
235 -.\" (at your option) any later version.
\r
237 -.\" Notmuch is distributed in the hope that it will be useful,
\r
238 -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
239 -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
240 -.\" GNU General Public License for more details.
\r
242 -.\" You should have received a copy of the GNU General Public License
\r
243 -.\" along with this program. If not, see http://www.gnu.org/licenses/ .
\r
245 -.\" Author: Carl Worth <cworth@cworth.org>
\r
246 -.TH NOTMUCH 1 2013-12-30 "Notmuch 0.17"
\r
248 -notmuch \- thread-based email index, search, and tagging
\r
251 -.RI "[" option " ...] " command " [" arg " ...]"
\r
253 -Notmuch is a command-line based program for indexing, searching,
\r
254 -reading, and tagging large collections of email messages.
\r
256 -This page describes how to get started using notmuch from the command
\r
257 -line, and gives a brief overview of the commands available. For more
\r
258 -information on e.g.
\r
260 -consult the \fBnotmuch-show\fR(1) man page, also accessible via
\r
261 -.B notmuch help show
\r
263 -The quickest way to get started with Notmuch is to simply invoke the
\r
265 -command with no arguments, which will interactively guide you through
\r
266 -the process of indexing your mail.
\r
268 -While the command-line program
\r
270 -provides powerful functionality, it does not provide the most
\r
271 -convenient interface for that functionality. More sophisticated
\r
272 -interfaces are expected to be built on top of either the command-line
\r
273 -interface, or more likely, on top of the notmuch library
\r
274 -interface. See http://notmuchmail.org for more about alternate
\r
275 -interfaces to notmuch. The emacs-based interface to notmuch (available under
\r
277 -in the Notmuch source distribution) is probably the most widely used at
\r
282 -Supported global options for
\r
290 -Print a synopsis of available commands and exit.
\r
297 -Print the installed version of notmuch, and exit.
\r
302 -.B \-\-config=FILE
\r
304 -Specify the configuration file to use. This overrides any
\r
305 -configuration file specified by ${NOTMUCH_CONFIG}.
\r
316 -command is used to configure Notmuch for first use, (or to reconfigure
\r
319 -The setup command will prompt for your full name, your primary email
\r
320 -address, any alternate email addresses you use, and the directory
\r
321 -containing your email archives. Your answers will be written to a
\r
322 -configuration file in ${NOTMUCH_CONFIG} (if set) or
\r
323 -${HOME}/.notmuch-config . This configuration file will be created with
\r
324 -descriptive comments, making it easy to edit by hand later to change the
\r
325 -configuration. Or you can run
\r
326 -.B "notmuch setup"
\r
327 -again to change the configuration.
\r
329 -The mail directory you specify can contain any number of
\r
330 -sub-directories and should primarily contain only files with individual
\r
331 -email messages (eg. maildir or mh archives are perfect). If there are
\r
332 -other, non-email files (such as indexes maintained by other email
\r
333 -programs) then notmuch will do its best to detect those and ignore
\r
336 -Mail storage that uses mbox format, (where one mbox file contains many
\r
337 -messages), will not work with notmuch. If that's how your mail is
\r
338 -currently stored, it is recommended you first convert it to maildir
\r
339 -format with a utility such as mb2md before running
\r
340 -.B "notmuch setup" .
\r
344 -with no command argument will run
\r
346 -if the setup command has not previously been completed.
\r
349 -.SS OTHER COMMANDS
\r
351 -Several of the notmuch commands accept search terms with a common
\r
352 -syntax. See \fNnotmuch-search-terms\fR(7)
\r
353 -for more details on the supported syntax.
\r
356 -.BR search ", " show " and " count
\r
357 -commands are used to query the email database.
\r
361 -command is useful for preparing a template for an email reply.
\r
365 -command is the only command available for manipulating database
\r
370 -.BR dump " and " restore
\r
371 -commands can be used to create a textual dump of email tags for backup
\r
372 -purposes, and to restore from that dump.
\r
376 -command can be used to get or set settings int the notmuch
\r
377 -configuration file.
\r
380 -The following environment variables can be used to control the
\r
381 -behavior of notmuch.
\r
384 -Specifies the location of the notmuch configuration file. Notmuch will
\r
385 -use ${HOME}/.notmuch\-config if this variable is not set.
\r
388 -.B NOTMUCH_TALLOC_REPORT
\r
389 -Location to write a talloc memory usage report. See
\r
390 -.B talloc_enable_leak_report_full
\r
391 -in \fBtalloc\fR(3)
\r
392 -for more information.
\r
395 -.B NOTMUCH_DEBUG_QUERY
\r
396 -If set to a non-empty value, the notmuch library will print (to stderr) Xapian
\r
397 -queries it constructs.
\r
401 -\fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
\r
402 -\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5),
\r
403 -\fBnotmuch-insert\fR(1), \fBnotmuch-new\fR(1),
\r
404 -\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),
\r
405 -\fBnotmuch-search\fR(1), \fBnotmuch-search-terms\fR(7),
\r
406 -\fBnotmuch-show\fR(1), \fBnotmuch-tag\fR(1)
\r
409 -The notmuch website:
\r
410 -.B http://notmuchmail.org
\r
412 -Feel free to send questions, comments, or kudos to the notmuch mailing
\r
413 -list <notmuch@notmuchmail.org> . Subscription is not required before
\r
414 -posting, but is available from the notmuchmail.org website.
\r
416 -Real-time interaction with the Notmuch community is available via IRC
\r
417 -(server: irc.freenode.net, channel: #notmuch).
\r
418 diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7
\r
419 deleted file mode 100644
\r
420 index a768b63..0000000
\r
421 --- a/man/man7/notmuch-search-terms.7
\r
424 -.TH NOTMUCH-SEARCH-TERMS 7 2013-12-30 "Notmuch 0.17"
\r
427 -notmuch-search-terms \- syntax for notmuch queries
\r
432 -.RI [ options... ]
\r
433 -.RI < search-term ">..."
\r
436 -.RI "[ <" filename "> ] [--]"
\r
437 -.RI "[ <" search-term ">...]"
\r
440 -.RI [ options "...] <" search-term ">..."
\r
443 -.RI "[" options "...] <" search-term ">..."
\r
446 -.RI "+<" tag> "|\-<" tag "> [...] [\-\-] <" search-term ">..."
\r
450 -Several notmuch commands accept a common syntax for search terms.
\r
452 -The search terms can consist of free-form text (and quoted phrases)
\r
453 -which will match all messages that contain all of the given
\r
454 -terms/phrases in the body, the subject, or any of the sender or
\r
455 -recipient headers.
\r
457 -As a special case, a search string consisting of exactly a single
\r
458 -asterisk ("*") will match all messages.
\r
460 -In addition to free text, the following prefixes can be used to force
\r
461 -terms to match against specific portions of an email, (where
\r
462 -<brackets> indicate user-supplied values):
\r
464 - from:<name-or-address>
\r
466 - to:<name-or-address>
\r
468 - subject:<word-or-quoted-phrase>
\r
470 - attachment:<word>
\r
472 - tag:<tag> (or is:<tag>)
\r
476 - thread:<thread-id>
\r
478 - folder:<directory-path>
\r
480 - date:<since>..<until>
\r
484 -prefix is used to match the name or address of the sender of an email
\r
489 -prefix is used to match the names or addresses of any recipient of an
\r
490 -email message, (whether To, Cc, or Bcc).
\r
492 -Any term prefixed with
\r
494 -will match only text from the subject of an email. Searching for a
\r
495 -phrase in the subject is supported by including quotation marks around
\r
496 -the phrase, immediately following
\r
501 -prefix can be used to search for specific filenames (or extensions) of
\r
502 -attachments to email messages.
\r
505 -.BR tag: " and " is:
\r
506 -valid tag values include
\r
507 -.BR inbox " and " unread
\r
508 -by default for new messages added by
\r
510 -as well as any other tag values added manually with
\r
511 -.BR "notmuch tag" .
\r
515 -message ID values are the literal contents of the Message\-ID: header
\r
516 -of email messages, but without the '<', '>' delimiters.
\r
520 -prefix can be used with the thread ID values that are generated
\r
521 -internally by notmuch (and do not appear in email messages). These
\r
522 -thread ID values can be seen in the first column of output from
\r
523 -.B "notmuch search"
\r
527 -prefix can be used to search for email message files that are
\r
528 -contained within particular directories within the mail store. If the
\r
529 -same email message has multiple message files associated with it, it's
\r
530 -sufficient for a match that at least one of the files is contained
\r
531 -within a matching directory. Only the directory components below the
\r
532 -top-level mail database path are available to be searched.
\r
536 -prefix can be used to restrict the results to only messages within a
\r
537 -particular time range (based on the Date: header) with a range syntax
\r
540 - date:<since>..<until>
\r
542 -See \fBDATE AND TIME SEARCH\fR below for details on the range
\r
543 -expression, and supported syntax for <since> and <until> date and time
\r
546 -The time range can also be specified using timestamps with a syntax
\r
549 - <initial-timestamp>..<final-timestamp>
\r
551 -Each timestamp is a number representing the number of seconds since
\r
552 -1970\-01\-01 00:00:00 UTC.
\r
554 -In addition to individual terms, multiple terms can be
\r
555 -combined with Boolean operators (
\r
556 -.BR and ", " or ", " not
\r
557 -, etc.). Each term in the query will be implicitly connected by a
\r
558 -logical AND if no explicit operator is provided, (except that terms
\r
559 -with a common prefix will be implicitly combined with OR until we get
\r
560 -Xapian defect #402 fixed).
\r
562 -Parentheses can also be used to control the combination of the Boolean
\r
563 -operators, but will have to be protected from interpretation by the
\r
564 -shell, (such as by putting quotation marks around any parenthesized
\r
567 -.SH DATE AND TIME SEARCH
\r
569 -notmuch understands a variety of standard and natural ways of
\r
570 -expressing dates and times, both in absolute terms ("2012-10-24") and
\r
571 -in relative terms ("yesterday"). Any number of relative terms can be
\r
572 -combined ("1 hour 25 minutes") and an absolute date/time can be
\r
573 -combined with relative terms to further adjust it. A non-exhaustive
\r
574 -description of the syntax supported for absolute and relative terms is
\r
579 -.B The range expression
\r
581 -date:<since>..<until>
\r
583 -The above expression restricts the results to only messages from
\r
584 -<since> to <until>, based on the Date: header.
\r
586 -<since> and <until> can describe imprecise times, such as "yesterday".
\r
587 -In this case, <since> is taken as the earliest time it could describe
\r
588 -(the beginning of yesterday) and <until> is taken as the latest time
\r
589 -it could describe (the end of yesterday). Similarly,
\r
590 -date:january..february matches from the beginning of January to the
\r
593 -Currently, we do not support spaces in range expressions. You can
\r
594 -replace the spaces with '_', or (in most cases) '-', or (in some
\r
595 -cases) leave the spaces out altogether. Examples in this man page use
\r
596 -spaces for clarity.
\r
598 -Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's
\r
599 -possible to specify date:..<until> or date:<since>.. to not limit the
\r
600 -start or end time, respectively. Pre-1.2.1 Xapian does not report an
\r
601 -error on open ended ranges, but it does not work as expected either.
\r
603 -Entering date:expr without ".." (for example date:yesterday) won't
\r
604 -work, as it's not interpreted as a range expression at all. You can
\r
605 -achieve the expected result by duplicating the expr both sides of ".."
\r
606 -(for example date:yesterday..yesterday).
\r
611 -.B Relative date and time
\r
612 -[N|number] (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]
\r
614 -All refer to past, can be repeated and will be accumulated.
\r
616 -Units can be abbreviated to any length, with the otherwise ambiguous
\r
617 -single m being m for minutes and M for months.
\r
619 -Number can also be written out one, two, ..., ten, dozen,
\r
620 -hundred. Additionally, the unit may be preceded by "last" or "this"
\r
621 -(e.g., "last week" or "this month").
\r
623 -When combined with absolute date and time, the relative date and time
\r
624 -specification will be relative from the specified absolute date and
\r
627 -Examples: 5M2d, two weeks
\r
632 -.B Supported absolute time formats
\r
633 -H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]
\r
635 -H[H] (am|a.m.|pm|p.m.)
\r
645 -Examples: 17:05, 5pm
\r
650 -.B Supported absolute date formats
\r
657 -M[M]/D[D][/[YY]YY]
\r
661 -D[D].M[M][.[YY]YY]
\r
663 -D[D][(st|nd|rd|th)] Mon[thname] [YYYY]
\r
665 -Mon[thname] D[D][(st|nd|rd|th)] [YYYY]
\r
669 -Month names can be abbreviated at three or more characters.
\r
671 -Weekday names can be abbreviated at three or more characters.
\r
673 -Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3
\r
683 -Some time zone codes, e.g. UTC, EET.
\r
688 -\fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
\r
689 -\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5),
\r
690 -\fBnotmuch-insert\fR(1), \fBnotmuch-new\fR(1),
\r
691 -\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),
\r
692 -\fBnotmuch-search\fR(1), \fBnotmuch-show\fR(1), \fBnotmuch-tag\fR(1)
\r
693 diff --git a/pod/notmuch-search-terms.pod b/pod/notmuch-search-terms.pod
\r
694 new file mode 100644
\r
695 index 0000000..47b9c20
\r
697 +++ b/pod/notmuch-search-terms.pod
\r
701 +notmuch-search-terms - syntax for notmuch queries
\r
705 +B<notmuch> B<count> [I<options...>] <I<search-term>>...
\r
707 +B<notmuch> B<dump> [ <I<filename>> ] [--] [ <I<search-term>>...]
\r
709 +B<notmuch> B<search> [I<options>...] <I<search-term>>...
\r
711 +B<notmuch> B<show> [I<options>...] <I<search-term>>...
\r
713 +B<notmuch> B<tag> +<I<tag>>|-<I<tag>> [...] [--] <I<search-term>>...
\r
715 +=head1 Description
\r
717 +Several notmuch commands accept a common syntax for search terms.
\r
719 +The search terms can consist of free-form text (and quoted phrases)
\r
720 +which will match all messages that contain all of the given
\r
721 +terms/phrases in the body, the subject, or any of the sender or
\r
722 +recipient headers.
\r
724 +As a special case, a search string consisting of exactly a single
\r
725 +asterisk ("*") will match all messages.
\r
727 +In addition to free text, the following prefixes can be used to force
\r
728 +terms to match against specific portions of an email, (where <brackets>
\r
729 +indicate user-supplied values):
\r
731 +from:<name-or-address>
\r
733 +to:<name-or-address>
\r
735 +subject:<word-or-quoted-phrase>
\r
739 +tag:<tag> (or is:<tag>)
\r
743 +thread:<thread-id>
\r
745 +folder:<directory-path>
\r
747 +date:<since>..<until>
\r
749 +The B<from:> prefix is used to match the name or address of the sender of
\r
752 +The B<to:> prefix is used to match the names or addresses of any recipient
\r
753 +of an email message, (whether To, Cc, or Bcc).
\r
755 +Any term prefixed with B<subject:> will match only text from the subject
\r
756 +of an email. Searching for a phrase in the subject is supported by
\r
757 +including quotation marks around the phrase, immediately following
\r
760 +The B<attachment:> prefix can be used to search for specific filenames (or
\r
761 +extensions) of attachments to email messages.
\r
763 +For B<tag:> and B<is:> valid tag values include B<inbox> and B<unread> by default
\r
764 +for new messages added by B<notmuch> B<new> as well as any other tag values
\r
765 +added manually with B<notmuch> B<tag>.
\r
767 +For B<id:>, message ID values are the literal contents of the Message-ID:
\r
768 +header of email messages, but without the `<', `>' delimiters.
\r
770 +The B<thread:> prefix can be used with the thread ID values that are
\r
771 +generated internally by notmuch (and do not appear in email messages).
\r
772 +These thread ID values can be seen in the first column of output from
\r
773 +B<notmuch> B<search>
\r
775 +The B<folder:> prefix can be used to search for email message files that
\r
776 +are contained within particular directories within the mail store. If
\r
777 +the same email message has multiple message files associated with it,
\r
778 +it's sufficient for a match that at least one of the files is contained
\r
779 +within a matching directory. Only the directory components below the
\r
780 +top-level mail database path are available to be searched.
\r
782 +The B<date:> prefix can be used to restrict the results to only messages
\r
783 +within a particular time range (based on the Date: header) with a range
\r
786 +date:<since>..<until>
\r
788 +See B<DATE> B<AND> B<TIME> B<SEARCH> below for details on the range expression, and
\r
789 +supported syntax for <since> and <until> date and time expressions.
\r
791 +The time range can also be specified using timestamps with a syntax of:
\r
793 +<initial-timestamp>..<final-timestamp>
\r
795 +Each timestamp is a number representing the number of seconds since
\r
796 +1970-01-01 00:00:00 UTC.
\r
798 +In addition to individual terms, multiple terms can be combined with
\r
799 +Boolean operators ( B<and>, B<or>, B<not> , etc.). Each term in the query will
\r
800 +be implicitly connected by a logical AND if no explicit operator is
\r
801 +provided, (except that terms with a common prefix will be implicitly
\r
802 +combined with OR until we get Xapian defect #402 fixed).
\r
804 +Parentheses can also be used to control the combination of the Boolean
\r
805 +operators, but will have to be protected from interpretation by the
\r
806 +shell, (such as by putting quotation marks around any parenthesized
\r
809 +=head1 Date and Time Search
\r
811 +notmuch understands a variety of standard and natural ways of
\r
812 +expressing dates and times, both in absolute terms ("2012-10-24") and
\r
813 +in relative terms ("yesterday"). Any number of relative terms can be
\r
814 +combined ("1 hour 25 minutes") and an absolute date/time can be
\r
815 +combined with relative terms to further adjust it. A non-exhaustive
\r
816 +description of the syntax supported for absolute and relative terms is
\r
819 +B<The> B<range> B<expression>
\r
821 +date:<since>..<until>
\r
823 +The above expression restricts the results to only messages
\r
824 +from <since> to <until>, based on the Date: header.
\r
826 +<since> and <until> can describe imprecise times, such as
\r
827 +"yesterday". In this case, <since> is taken as the earliest
\r
828 +time it could describe (the beginning of yesterday) and <until>
\r
829 +is taken as the latest time it could describe (the end of
\r
830 +yesterday). Similarly, date:january..february matches from the
\r
831 +beginning of January to the end of February.
\r
833 +Currently, we do not support spaces in range expressions. You
\r
834 +can replace the spaces with `_', or (in most cases) `-', or (in
\r
835 +some cases) leave the spaces out altogether. Examples in this
\r
836 +man page use spaces for clarity.
\r
838 +Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's
\r
839 +possible to specify date:..<until> or date:<since>.. to not
\r
840 +limit the start or end time, respectively. Pre-1.2.1 Xapian
\r
841 +does not report an error on open ended ranges, but it does not
\r
842 +work as expected either.
\r
844 +Entering date:expr without ".." (for example date:yesterday)
\r
845 +won't work, as it's not interpreted as a range expression at
\r
846 +all. You can achieve the expected result by duplicating the
\r
847 +expr both sides of ".." (for example
\r
848 +date:yesterday..yesterday).
\r
850 +B<Relative> B<date> B<and> B<time>
\r
852 +(years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs)
\r
855 +All refer to past, can be repeated and will be accumulated.
\r
857 +Units can be abbreviated to any length, with the otherwise
\r
858 +ambiguous single m being m for minutes and M for months.
\r
860 +Number can also be written out one, two, ..., ten, dozen,
\r
861 +hundred. Additionally, the unit may be preceded by "last" or
\r
862 +"this" (e.g., "last week" or "this month").
\r
864 +When combined with absolute date and time, the relative date
\r
865 +and time specification will be relative from the specified
\r
866 +absolute date and time.
\r
868 +Examples: 5M2d, two weeks
\r
870 +B<Supported> B<absolute> B<time> B<formats>
\r
871 +H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]
\r
873 +H[H] (am|a.m.|pm|p.m.)
\r
887 +Examples: 17:05, 5pm
\r
889 +B<Supported> B<absolute> B<date> B<formats>
\r
894 +=item DD-MM[-[YY]YY]
\r
898 +=item M[M]/D[D][/[YY]YY]
\r
902 +=item D[D].M[M][.[YY]YY]
\r
906 +D[D][(st|nd|rd|th)] Mon[thname] [YYYY]
\r
908 +Mon[thname] D[D][(st|nd|rd|th)] [YYYY]
\r
912 +Month names can be abbreviated at three or more characters.
\r
914 +Weekday names can be abbreviated at three or more characters.
\r
916 +Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3
\r
927 +Some time zone codes, e.g. UTC, EET.
\r
931 +L<notmuch(1)>, L<notmuch-config(1)>, L<notmuch-count(1)>, L<notmuch-dump(1)>,
\r
932 +L<notmuch-hooks(5)>, L<notmuch-insert(1)>, L<notmuch-new(1)>, L<notmuch-reply(1)>,
\r
933 +L<notmuch-restore(1)>, L<notmuch-search(1)>, L<notmuch-show(1)>, L<notmuch-tag(1)>
\r
934 diff --git a/pod/notmuch.pod b/pod/notmuch.pod
\r
935 new file mode 100644
\r
936 index 0000000..5b11967
\r
938 +++ b/pod/notmuch.pod
\r
942 +notmuch - thread-based email index, search, and tagging
\r
946 +B<notmuch> [I<option> ...] I<command> [I<arg> ...]
\r
948 +=head1 Description
\r
950 +Notmuch is a command-line based program for indexing, searching,
\r
951 +reading, and tagging large collections of email messages.
\r
953 +This page describes how to get started using notmuch from the command
\r
954 +line, and gives a brief overview of the commands available. For more
\r
955 +information on e.g. B<notmuch> B<show> consult the L<notmuch-show(1)> man page,
\r
956 +also accessible via B<notmuch> B<help> B<show>
\r
958 +The quickest way to get started with Notmuch is to simply invoke the
\r
959 +B<notmuch> command with no arguments, which will interactively guide you
\r
960 +through the process of indexing your mail.
\r
964 +While the command-line program B<notmuch> provides powerful functionality,
\r
965 +it does not provide the most convenient interface for that
\r
966 +functionality. More sophisticated interfaces are expected to be built
\r
967 +on top of either the command-line interface, or more likely, on top of
\r
968 +the notmuch library interface. See http://notmuchmail.org for more
\r
969 +about alternate interfaces to notmuch. The emacs-based interface to
\r
970 +notmuch (available under B<emacs/> in the Notmuch source distribution) is
\r
971 +probably the most widely used at this time.
\r
975 +Supported global options for B<notmuch> include
\r
983 +Print a synopsis of available commands and exit.
\r
987 +=item B<--version>
\r
991 +Print the installed version of notmuch, and exit.
\r
995 +=item B<--config=FILE>
\r
999 +Specify the configuration file to use. This overrides any
\r
1000 +configuration file specified by ${NOTMUCH_CONFIG}.
\r
1005 +The B<notmuch> B<setup> command is used to configure Notmuch for first use,
\r
1006 +(or to reconfigure it later).
\r
1008 +The setup command will prompt for your full name, your primary email
\r
1009 +address, any alternate email addresses you use, and the directory
\r
1010 +containing your email archives. Your answers will be written to a
\r
1011 +configuration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-
\r
1012 +config . This configuration file will be created with descriptive
\r
1013 +comments, making it easy to edit by hand later to change the
\r
1014 +configuration. Or you can run B<notmuch> B<setup> again to change the
\r
1017 +The mail directory you specify can contain any number of sub-
\r
1018 +directories and should primarily contain only files with individual
\r
1019 +email messages (eg. maildir or mh archives are perfect). If there are
\r
1020 +other, non-email files (such as indexes maintained by other email
\r
1021 +programs) then notmuch will do its best to detect those and ignore
\r
1024 +Mail storage that uses mbox format, (where one mbox file contains many
\r
1025 +messages), will not work with notmuch. If that's how your mail is
\r
1026 +currently stored, it is recommended you first convert it to maildir
\r
1027 +format with a utility such as mb2md before running B<notmuch> B<setup> B<.>
\r
1029 +Invoking B<notmuch> with no command argument will run B<setup> if the setup
\r
1030 +command has not previously been completed.
\r
1032 +B<OTHER> B<COMMANDS>
\r
1033 +Several of the notmuch commands accept search terms with a common
\r
1034 +syntax. See L<notmuch-search-terms(7)> for more details on the supported
\r
1037 +The B<search>, B<show> and B<count> commands are used to query the email
\r
1040 +The B<reply> command is useful for preparing a template for an email
\r
1043 +The B<tag> command is the only command available for manipulating database
\r
1046 +The B<dump> and B<restore> commands can be used to create a textual dump of
\r
1047 +email tags for backup purposes, and to restore from that dump.
\r
1049 +The B<config> command can be used to get or set settings int the notmuch
\r
1050 +configuration file.
\r
1052 +=head1 Environment
\r
1054 +The following environment variables can be used to control the behavior
\r
1059 +=item B<NOTMUCH_CONFIG>
\r
1061 +Specifies the location of the notmuch configuration file.
\r
1062 +Notmuch will use ${HOME}/.notmuch-config if this variable is not
\r
1065 +=item B<NOTMUCH_TALLOC_REPORT>
\r
1067 +Location to write a talloc memory usage report. See
\r
1068 +B<talloc_enable_leak_report_full> in L<talloc(3)> for more
\r
1071 +=item B<NOTMUCH_DEBUG_QUERY>
\r
1073 +If set to a non-empty value, the notmuch library will print (to
\r
1074 +stderr) Xapian queries it constructs.
\r
1080 +L<notmuch-config(1)>, L<notmuch-count(1)>, L<notmuch-dump(1)>, L<notmuch-hooks(5)>,
\r
1081 +L<notmuch-insert(1)>, L<notmuch-new(1)>, L<notmuch-reply(1)>, L<notmuch-restore(1)>,
\r
1082 +L<notmuch-search(1)>, L<notmuch-search-terms(7)>, L<notmuch-show(1)>,
\r
1083 +L<notmuch-tag(1)>
\r
1085 +The notmuch website: B<http://notmuchmail.org>
\r
1089 +Feel free to send questions, comments, or kudos to the notmuch mailing
\r
1090 +list <notmuch@notmuchmail.org> . Subscription is not required before
\r
1091 +posting, but is available from the notmuchmail.org website.
\r
1093 +Real-time interaction with the Notmuch community is available via IRC
\r
1094 +(server: irc.freenode.net, channel: #notmuch).
\r