Re: Hi all
[notmuch-archives.git] / ec / 89b05495d8d98d89c69918c9b6c36fa44355bb
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 DB833431FBF\r
6         for <notmuch@notmuchmail.org>; Wed, 24 Apr 2013 18:20:00 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 w5XpVVlrd0ez for <notmuch@notmuchmail.org>;\r
16         Wed, 24 Apr 2013 18:19:55 -0700 (PDT)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\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 9F0C4431FAF\r
21         for <notmuch@notmuchmail.org>; Wed, 24 Apr 2013 18:19:50 -0700 (PDT)\r
22 Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([156.34.82.78] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80)\r
26         (envelope-from <bremner@tethera.net>)\r
27         id 1UVAqd-0002Tx-9Q; Wed, 24 Apr 2013 22:19:49 -0300\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1UVAqX-000144-NH; Wed, 24 Apr 2013 22:19:37 -0300\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [RFC Patch v2 2/3] man: partial conversion to pod.\r
34 Date: Wed, 24 Apr 2013 22:19:11 -0300\r
35 Message-Id: <1366852752-3584-3-git-send-email-david@tethera.net>\r
36 X-Mailer: git-send-email 1.8.2.rc2\r
37 In-Reply-To: <1366852752-3584-1-git-send-email-david@tethera.net>\r
38 References: <1362882151-14030-1-git-send-email-david@tethera.net>\r
39         <1366852752-3584-1-git-send-email-david@tethera.net>\r
40 MIME-Version: 1.0\r
41 Content-Type: text/plain; charset=UTF-8\r
42 Content-Transfer-Encoding: 8bit\r
43 X-Spam_bar: -\r
44 Cc: David Bremner <bremner@debian.org>\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Thu, 25 Apr 2013 01:20:01 -0000\r
58 \r
59 From: David Bremner <bremner@debian.org>\r
60 \r
61 This allows generation of man page and info document from the same source.\r
62 It is also a bit more friendly to edit for most people.\r
63 \r
64 The conversion was done as follows:\r
65 \r
66  % groff -e -mandoc -Tascii -rHY=0 $* | rman -f POD | sed  -e '/./,/^$/!d' -e 's/\r
67 \r
68 Some small hand-editing of the .pod may be needed afterwards.\r
69 ---\r
70  INSTALL                         |   6 +\r
71  configure                       |  12 ++\r
72  info/Makefile.local             |  25 +++-\r
73  man/Makefile.local              |  19 ++-\r
74  man/man1/notmuch.1              | 184 ---------------------------\r
75  man/man7/notmuch-search-terms.7 | 266 ----------------------------------------\r
76  pod/notmuch-search-terms.pod    | 233 +++++++++++++++++++++++++++++++++++\r
77  pod/notmuch.pod                 | 149 ++++++++++++++++++++++\r
78  8 files changed, 440 insertions(+), 454 deletions(-)\r
79  delete mode 100644 man/man1/notmuch.1\r
80  delete mode 100644 man/man7/notmuch-search-terms.7\r
81  create mode 100644 pod/notmuch-search-terms.pod\r
82  create mode 100644 pod/notmuch.pod\r
83 \r
84 diff --git a/INSTALL b/INSTALL\r
85 index 451bf05..697b7b2 100644\r
86 --- a/INSTALL\r
87 +++ b/INSTALL\r
88 @@ -60,6 +60,12 @@ Talloc which are each described below:\r
89  \r
90         Talloc is available from http://talloc.samba.org/\r
91  \r
92 +       pod2man\r
93 +       -------\r
94 +\r
95 +       Some of the documentation is built with pod2man. This is part\r
96 +       of the standard Perl distribution since Perl 5.6.0\r
97 +\r
98         texinfo\r
99         -------\r
100  \r
101 diff --git a/configure b/configure\r
102 index 5243f6a..a0c53e2 100755\r
103 --- a/configure\r
104 +++ b/configure\r
105 @@ -371,6 +371,15 @@ else\r
106      have_emacs=0\r
107  fi\r
108  \r
109 +printf "Checking for pod2man... "\r
110 +if pod2man --help > /dev/null 2>&1; then\r
111 +    printf "Yes.\n"\r
112 +    have_pod2man=1\r
113 +else\r
114 +    printf "No (man page install may fail)\n"\r
115 +    have_pod2man=0\r
116 +fi\r
117 +\r
118  printf "Checking for makeinfo... "\r
119  if makeinfo --version > /dev/null 2>&1; then\r
120      printf "Yes.\n"\r
121 @@ -687,6 +696,9 @@ HAVE_MAKEINFO = ${have_makeinfo}\r
122  # Whether there's an install-info binary available\r
123  HAVE_INSTALLINFO = ${have_installinfo}\r
124  \r
125 +# Is pod2man in the path?\r
126 +HAVE_POD2MAN = ${have_pod2man}\r
127 +\r
128  # where to install info files\r
129  \r
130  INFODIR = ${INFODIR}\r
131 diff --git a/info/Makefile.local b/info/Makefile.local\r
132 index 55e9740..cca891a 100644\r
133 --- a/info/Makefile.local\r
134 +++ b/info/Makefile.local\r
135 @@ -2,10 +2,14 @@\r
136  \r
137  dir := info\r
138  \r
139 +man_texi :=  $(dir)/notmuch.texi $(dir)/notmuch-search-terms.texi\r
140 +man_info := $(man_texi:.texi=.info)\r
141 +man_entry := $(man_texi:.texi=.entry)\r
142 +\r
143  texi_sources :=  $(dir)/notmuch-emacs.texi\r
144  emacs_info := $(texi_sources:.texi=.info)\r
145  \r
146 -info := $(emacs_info)\r
147 +info := $(emacs_info) $(man_info)\r
148  \r
149  ifeq ($(HAVE_MAKEINFO),1)\r
150  all: $(info)\r
151 @@ -15,11 +19,23 @@ ifeq ($(HAVE_INSTALLINFO),1)\r
152  install: install-info\r
153  endif\r
154  \r
155 -%.info: %.texi\r
156 +%.entry: ../pod/%.pod\r
157 +       printf "@dircategory Notmuch\n@direntry\n" > $@\r
158 +       printf "* %s: (%s). " $(*F) $(*F) >> $@\r
159 +       podselect -section Name $< | \\r
160 +         perl -n -e  's/notmuch.* - (.*)/\u\L$$1/ && print' >> $@\r
161 +       printf "@end direntry\n" >> $@\r
162 +\r
163 +%.info: %.texi %.entry\r
164         makeinfo --no-split -o $@ $<\r
165  \r
166  $(dir)/notmuch-emacs.info: $(dir)/notmuch-emacs.texi $(dir)/version.texi\r
167  \r
168 +%.texi: ../pod/%.pod\r
169 +       # a nasty hack, but the nicer ways seem to have bugs.\r
170 +       pod2texi  $< | \\r
171 +          sed 's/@node Top/@include $(*F).entry\n@node Top/' > $@\r
172 +\r
173  .PHONY: $(dir)/version.texi\r
174  $(dir)/version.texi: version\r
175         printf "@set VERSION ${VERSION}\n" > $@\r
176 @@ -29,5 +45,8 @@ install-info: ${info}\r
177         mkdir -p "$(DESTDIR)$(INFODIR)"\r
178         install -m0644 $(info) "$(DESTDIR)$(INFODIR)"\r
179         install-info --section=Notmuch --info-dir=${DESTDIR}${INFODIR} $(emacs_info)\r
180 +       for ifile in $(man_info); do \\r
181 +           install-info --info-dir=${DESTDIR}${INFODIR} $${ifile}; \\r
182 +       done\r
183  \r
184 -CLEAN := $(CLEAN) $(info)\r
185 +CLEAN := $(CLEAN) $(info) $(man_entry) $(dir)/version.texi\r
186 diff --git a/man/Makefile.local b/man/Makefile.local\r
187 index 72e2a18..ceb5063 100644\r
188 --- a/man/Makefile.local\r
189 +++ b/man/Makefile.local\r
190 @@ -21,6 +21,8 @@ MAN1 := \\r
191  MAN5 := $(dir)/man5/notmuch-hooks.5\r
192  MAN7 := $(dir)/man7/notmuch-search-terms.7\r
193  \r
194 +GENERATED_MAN := $(MAIN_PAGE) $(MAN7)\r
195 +\r
196  MAN1_GZ := $(addsuffix .gz,$(MAN1))\r
197  MAN5_GZ := $(addsuffix .gz,$(MAN5))\r
198  MAN7_GZ := $(addsuffix .gz,$(MAN7))\r
199 @@ -32,6 +34,21 @@ COMPRESSED_MAN := $(MAN1_GZ) $(MAN5_GZ) $(MAN7_GZ)\r
200  %.gz: %\r
201         gzip --stdout $^ > $@\r
202  \r
203 +POD2MAN_RECIPE = mkdir -p $(@D) && \\r
204 +                pod2man --section=$(subst .,,$(suffix $@)) \\r
205 +                        --center="Notmuch Documentation" --release=${VERSION} $< > $@\r
206 +\r
207 +$(dir)/man1/%.1: $(dir)/../pod/%.pod\r
208 +       $(POD2MAN_RECIPE)\r
209 +\r
210 +$(dir)/man5/%.5: $(dir)/../pod/%.pod\r
211 +       $(POD2MAN_RECIPE)\r
212 +\r
213 +$(dir)/man7/%.7: $(dir)/../pod/%.pod\r
214 +       $(POD2MAN_RECIPE)\r
215 +\r
216 +CLEAN := $(CLEAN) $(NROFF7)\r
217 +\r
218  .PHONY: install-man update-man-versions\r
219  \r
220  install-man: $(COMPRESSED_MAN)\r
221 @@ -50,4 +67,4 @@ update-man-versions: $(MAN_SOURCE)\r
222                 < $$file.bak > $$file; \\r
223         done\r
224  \r
225 -CLEAN := $(CLEAN) $(COMPRESSED_MAN) $(MAN_BACKUP)\r
226 +CLEAN := $(CLEAN) $(COMPRESSED_MAN) $(MAN_BACKUP) $(GENERATED_MAN)\r
227 diff --git a/man/man1/notmuch.1 b/man/man1/notmuch.1\r
228 deleted file mode 100644\r
229 index 923fefe..0000000\r
230 --- a/man/man1/notmuch.1\r
231 +++ /dev/null\r
232 @@ -1,184 +0,0 @@\r
233 -.\" notmuch - Not much of an email program, (just index, search and tagging)\r
234 -.\"\r
235 -.\" Copyright Â© 2009 Carl Worth\r
236 -.\"\r
237 -.\" Notmuch is free software: you can redistribute it and/or modify\r
238 -.\" it under the terms of the GNU General Public License as published by\r
239 -.\" the Free Software Foundation, either version 3 of the License, or\r
240 -.\" (at your option) any later version.\r
241 -.\"\r
242 -.\" Notmuch is distributed in the hope that it will be useful,\r
243 -.\" but WITHOUT ANY WARRANTY; without even the implied warranty of\r
244 -.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
245 -.\" GNU General Public License for more details.\r
246 -.\"\r
247 -.\" You should have received a copy of the GNU General Public License\r
248 -.\" along with this program.  If not, see http://www.gnu.org/licenses/ .\r
249 -.\"\r
250 -.\" Author: Carl Worth <cworth@cworth.org>\r
251 -.TH NOTMUCH 1 2013-02-17 "Notmuch 0.15.2"\r
252 -.SH NAME\r
253 -notmuch \- thread-based email index, search, and tagging\r
254 -.SH SYNOPSIS\r
255 -.B notmuch\r
256 -.RI "[" option " ...] " command  " [" arg " ...]"\r
257 -.SH DESCRIPTION\r
258 -Notmuch is a command-line based program for indexing, searching,\r
259 -reading, and tagging large collections of email messages.\r
260 -\r
261 -This page describes how to get started using notmuch from the command\r
262 -line, and gives a brief overview of the commands available. For more\r
263 -information on e.g.\r
264 -.B notmuch show\r
265 -consult the \fBnotmuch-show\fR(1) man page, also accessible via\r
266 -.B notmuch help show\r
267 -\r
268 -The quickest way to get started with Notmuch is to simply invoke the\r
269 -.B notmuch\r
270 -command with no arguments, which will interactively guide you through\r
271 -the process of indexing your mail.\r
272 -.SH NOTE\r
273 -While the command-line program\r
274 -.B notmuch\r
275 -provides powerful functionality, it does not provide the most\r
276 -convenient interface for that functionality. More sophisticated\r
277 -interfaces are expected to be built on top of either the command-line\r
278 -interface, or more likely, on top of the notmuch library\r
279 -interface. See http://notmuchmail.org for more about alternate\r
280 -interfaces to notmuch. The emacs-based interface to notmuch (available under\r
281 -.B emacs/\r
282 -in the Notmuch source distribution) is probably the most widely used at\r
283 -this time.\r
284 -\r
285 -.SH OPTIONS\r
286 -\r
287 -Supported global options for\r
288 -.B notmuch\r
289 -include\r
290 -\r
291 -.RS 4\r
292 -.TP 4\r
293 -.B \-\-help\r
294 -\r
295 -Print a synopsis of available commands and exit.\r
296 -.RE\r
297 -\r
298 -.RS 4\r
299 -.TP 4\r
300 -.B \-\-version\r
301 -\r
302 -Print the installed version of notmuch, and exit.\r
303 -.RE\r
304 -\r
305 -.RS 4\r
306 -.TP 4\r
307 -.B \-\-config=FILE\r
308 -\r
309 -Specify the configuration file to use. This overrides any\r
310 -configuration file specified by ${NOTMUCH_CONFIG}.\r
311 -\r
312 -.RE\r
313 -\r
314 -.SH COMMANDS\r
315 -\r
316 -\r
317 -.SS SETUP\r
318 -\r
319 -The\r
320 -.B notmuch setup\r
321 -command is used to configure Notmuch for first use, (or to reconfigure\r
322 -it later).\r
323 -\r
324 -The setup command will prompt for your full name, your primary email\r
325 -address, any alternate email addresses you use, and the directory\r
326 -containing your email archives. Your answers will be written to a\r
327 -configuration file in ${NOTMUCH_CONFIG} (if set) or\r
328 -${HOME}/.notmuch-config . This configuration file will be created with\r
329 -descriptive comments, making it easy to edit by hand later to change the\r
330 -configuration. Or you can run\r
331 -.B "notmuch setup"\r
332 -again to change the configuration.\r
333 -\r
334 -The mail directory you specify can contain any number of\r
335 -sub-directories and should primarily contain only files with individual\r
336 -email messages (eg. maildir or mh archives are perfect). If there are\r
337 -other, non-email files (such as indexes maintained by other email\r
338 -programs) then notmuch will do its best to detect those and ignore\r
339 -them.\r
340 -\r
341 -Mail storage that uses mbox format, (where one mbox file contains many\r
342 -messages), will not work with notmuch. If that's how your mail is\r
343 -currently stored, it is recommended you first convert it to maildir\r
344 -format with a utility such as mb2md before running\r
345 -.B "notmuch setup" .\r
346 -\r
347 -Invoking\r
348 -.B notmuch\r
349 -with no command argument will run\r
350 -.B setup\r
351 -if the setup command has not previously been completed.\r
352 -.RE\r
353 -\r
354 -.SS OTHER COMMANDS\r
355 -\r
356 -Several of the notmuch commands accept search terms with a common\r
357 -syntax. See \fNnotmuch-search-terms\fR(7)\r
358 -for more details on the supported syntax.\r
359 -\r
360 -The\r
361 -.BR search ", " show " and " count\r
362 -commands are used to query the email database.\r
363 -\r
364 -The\r
365 -.B reply\r
366 -command is useful for preparing a template for an email reply.\r
367 -\r
368 -The\r
369 -.B tag\r
370 -command is the only command available for manipulating database\r
371 -contents.\r
372 -\r
373 -\r
374 -The\r
375 -.BR dump " and " restore\r
376 -commands can be used to create a textual dump of email tags for backup\r
377 -purposes, and to restore from that dump.\r
378 -\r
379 -The\r
380 -.B config\r
381 -command can be used to get or set settings int the notmuch\r
382 -configuration file.\r
383 -\r
384 -.SH ENVIRONMENT\r
385 -The following environment variables can be used to control the\r
386 -behavior of notmuch.\r
387 -.TP\r
388 -.B NOTMUCH_CONFIG\r
389 -Specifies the location of the notmuch configuration file. Notmuch will\r
390 -use ${HOME}/.notmuch\-config if this variable is not set.\r
391 -\r
392 -.TP\r
393 -.B NOTMUCH_TALLOC_REPORT\r
394 -Location to write a talloc memory usage report. See\r
395 -.B talloc_enable_leak_report_full\r
396 -in \fBtalloc\fR(3)\r
397 -for more information.\r
398 -\r
399 -.SH SEE ALSO\r
400 -\r
401 -\fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),\r
402 -\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),\r
403 -\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),\r
404 -\fBnotmuch-search\fR(1), \fBnotmuch-search-terms\fR(7),\r
405 -\fBnotmuch-show\fR(1), \fBnotmuch-tag\fR(1)\r
406 -\r
407 -\r
408 -The notmuch website:\r
409 -.B http://notmuchmail.org\r
410 -.SH CONTACT\r
411 -Feel free to send questions, comments, or kudos to the notmuch mailing\r
412 -list <notmuch@notmuchmail.org> . Subscription is not required before\r
413 -posting, but is available from the notmuchmail.org website.\r
414 -\r
415 -Real-time interaction with the Notmuch community is available via IRC\r
416 -(server: irc.freenode.net, channel: #notmuch).\r
417 diff --git a/man/man7/notmuch-search-terms.7 b/man/man7/notmuch-search-terms.7\r
418 deleted file mode 100644\r
419 index eb417ba..0000000\r
420 --- a/man/man7/notmuch-search-terms.7\r
421 +++ /dev/null\r
422 @@ -1,266 +0,0 @@\r
423 -.TH NOTMUCH-SEARCH-TERMS 7 2013-02-17 "Notmuch 0.15.2"\r
424 -\r
425 -.SH NAME\r
426 -notmuch-search-terms \- syntax for notmuch queries\r
427 -\r
428 -.SH SYNOPSIS\r
429 -\r
430 -.B notmuch count\r
431 -.RI  [ options... ]\r
432 -.RI  < search-term ">..."\r
433 -\r
434 -.B "notmuch dump"\r
435 -.RI "[ <" filename "> ] [--]"\r
436 -.RI "[ <" search-term ">...]"\r
437 -\r
438 -.B notmuch search\r
439 -.RI  [  options "...] <" search-term ">..."\r
440 -\r
441 -.B notmuch show\r
442 -.RI "[" options "...] <" search-term ">..."\r
443 -\r
444 -.B notmuch tag\r
445 -.RI  "+<" tag> "|\-<" tag "> [...] [\-\-] <" search-term ">..."\r
446 -\r
447 -\r
448 -.SH DESCRIPTION\r
449 -Several notmuch commands accept a common syntax for search terms.\r
450 -\r
451 -The search terms can consist of free-form text (and quoted phrases)\r
452 -which will match all messages that contain all of the given\r
453 -terms/phrases in the body, the subject, or any of the sender or\r
454 -recipient headers.\r
455 -\r
456 -As a special case, a search string consisting of exactly a single\r
457 -asterisk ("*") will match all messages.\r
458 -\r
459 -In addition to free text, the following prefixes can be used to force\r
460 -terms to match against specific portions of an email, (where\r
461 -<brackets> indicate user-supplied values):\r
462 -\r
463 -       from:<name-or-address>\r
464 -\r
465 -       to:<name-or-address>\r
466 -\r
467 -       subject:<word-or-quoted-phrase>\r
468 -\r
469 -       attachment:<word>\r
470 -\r
471 -       tag:<tag> (or is:<tag>)\r
472 -\r
473 -       id:<message-id>\r
474 -\r
475 -       thread:<thread-id>\r
476 -\r
477 -       folder:<directory-path>\r
478 -\r
479 -       date:<since>..<until>\r
480 -\r
481 -The\r
482 -.B from:\r
483 -prefix is used to match the name or address of the sender of an email\r
484 -message.\r
485 -\r
486 -The\r
487 -.B to:\r
488 -prefix is used to match the names or addresses of any recipient of an\r
489 -email message, (whether To, Cc, or Bcc).\r
490 -\r
491 -Any term prefixed with\r
492 -.B subject:\r
493 -will match only text from the subject of an email. Searching for a\r
494 -phrase in the subject is supported by including quotation marks around\r
495 -the phrase, immediately following\r
496 -.BR subject: .\r
497 -\r
498 -The\r
499 -.B attachment:\r
500 -prefix can be used to search for specific filenames (or extensions) of\r
501 -attachments to email messages.\r
502 -\r
503 -For\r
504 -.BR tag: " and " is:\r
505 -valid tag values include\r
506 -.BR inbox " and " unread\r
507 -by default for new messages added by\r
508 -.B notmuch new\r
509 -as well as any other tag values added manually with\r
510 -.BR "notmuch tag" .\r
511 -\r
512 -For\r
513 -.BR id: ,\r
514 -message ID values are the literal contents of the Message\-ID: header\r
515 -of email messages, but without the '<', '>' delimiters.\r
516 -\r
517 -The\r
518 -.B thread:\r
519 -prefix can be used with the thread ID values that are generated\r
520 -internally by notmuch (and do not appear in email messages). These\r
521 -thread ID values can be seen in the first column of output from\r
522 -.B "notmuch search"\r
523 -\r
524 -The\r
525 -.B folder:\r
526 -prefix can be used to search for email message files that are\r
527 -contained within particular directories within the mail store. Only\r
528 -the directory components below the top-level mail database path are\r
529 -available to be searched.\r
530 -\r
531 -The\r
532 -.B date:\r
533 -prefix can be used to restrict the results to only messages within a\r
534 -particular time range (based on the Date: header) with a range syntax\r
535 -of:\r
536 -\r
537 -       date:<since>..<until>\r
538 -\r
539 -See \fBDATE AND TIME SEARCH\fR below for details on the range\r
540 -expression, and supported syntax for <since> and <until> date and time\r
541 -expressions.\r
542 -\r
543 -The time range can also be specified using timestamps with a syntax\r
544 -of:\r
545 -\r
546 -       <initial-timestamp>..<final-timestamp>\r
547 -\r
548 -Each timestamp is a number representing the number of seconds since\r
549 -1970\-01\-01 00:00:00 UTC.\r
550 -\r
551 -In addition to individual terms, multiple terms can be\r
552 -combined with Boolean operators (\r
553 -.BR and ", " or ", " not\r
554 -, etc.). Each term in the query will be implicitly connected by a\r
555 -logical AND if no explicit operator is provided, (except that terms\r
556 -with a common prefix will be implicitly combined with OR until we get\r
557 -Xapian defect #402 fixed).\r
558 -\r
559 -Parentheses can also be used to control the combination of the Boolean\r
560 -operators, but will have to be protected from interpretation by the\r
561 -shell, (such as by putting quotation marks around any parenthesized\r
562 -expression).\r
563 -\r
564 -.SH DATE AND TIME SEARCH\r
565 -\r
566 -notmuch understands a variety of standard and natural ways of\r
567 -expressing dates and times, both in absolute terms ("2012-10-24") and\r
568 -in relative terms ("yesterday"). Any number of relative terms can be\r
569 -combined ("1 hour 25 minutes") and an absolute date/time can be\r
570 -combined with relative terms to further adjust it. A non-exhaustive\r
571 -description of the syntax supported for absolute and relative terms is\r
572 -given below.\r
573 -\r
574 -.RS 4\r
575 -.TP 4\r
576 -.B The range expression\r
577 -\r
578 -date:<since>..<until>\r
579 -\r
580 -The above expression restricts the results to only messages from\r
581 -<since> to <until>, based on the Date: header.\r
582 -\r
583 -<since> and <until> can describe imprecise times, such as "yesterday".\r
584 -In this case, <since> is taken as the earliest time it could describe\r
585 -(the beginning of yesterday) and <until> is taken as the latest time\r
586 -it could describe (the end of yesterday). Similarly,\r
587 -date:january..february matches from the beginning of January to the\r
588 -end of February.\r
589 -\r
590 -Currently, we do not support spaces in range expressions. You can\r
591 -replace the spaces with '_', or (in most cases) '-', or (in some\r
592 -cases) leave the spaces out altogether. Examples in this man page use\r
593 -spaces for clarity.\r
594 -\r
595 -Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's\r
596 -possible to specify date:..<until> or date:<since>.. to not limit the\r
597 -start or end time, respectively. Pre-1.2.1 Xapian does not report an\r
598 -error on open ended ranges, but it does not work as expected either.\r
599 -\r
600 -Entering date:expr without ".." (for example date:yesterday) won't\r
601 -work, as it's not interpreted as a range expression at all. You can\r
602 -achieve the expected result by duplicating the expr both sides of ".."\r
603 -(for example date:yesterday..yesterday).\r
604 -.RE\r
605 -\r
606 -.RS 4\r
607 -.TP 4\r
608 -.B Relative date and time\r
609 -[N|number] (years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs) [...]\r
610 -\r
611 -All refer to past, can be repeated and will be accumulated.\r
612 -\r
613 -Units can be abbreviated to any length, with the otherwise ambiguous\r
614 -single m being m for minutes and M for months.\r
615 -\r
616 -Number can also be written out one, two, ..., ten, dozen,\r
617 -hundred. Additionally, the unit may be preceded by "last" or "this"\r
618 -(e.g., "last week" or "this month").\r
619 -\r
620 -When combined with absolute date and time, the relative date and time\r
621 -specification will be relative from the specified absolute date and\r
622 -time.\r
623 -\r
624 -Examples: 5M2d, two weeks\r
625 -.RE\r
626 -\r
627 -.RS 4\r
628 -.TP 4\r
629 -.B Supported absolute time formats\r
630 -H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
631 -\r
632 -H[H] (am|a.m.|pm|p.m.)\r
633 -\r
634 -HHMMSS\r
635 -\r
636 -now\r
637 -\r
638 -noon\r
639 -\r
640 -midnight\r
641 -\r
642 -Examples: 17:05, 5pm\r
643 -.RE\r
644 -\r
645 -.RS 4\r
646 -.TP 4\r
647 -.B Supported absolute date formats\r
648 -YYYY-MM[-DD]\r
649 -\r
650 -DD-MM[-[YY]YY]\r
651 -\r
652 -MM-YYYY\r
653 -\r
654 -M[M]/D[D][/[YY]YY]\r
655 -\r
656 -M[M]/YYYY\r
657 -\r
658 -D[D].M[M][.[YY]YY]\r
659 -\r
660 -D[D][(st|nd|rd|th)] Mon[thname] [YYYY]\r
661 -\r
662 -Mon[thname] D[D][(st|nd|rd|th)] [YYYY]\r
663 -\r
664 -Wee[kday]\r
665 -\r
666 -Month names can be abbreviated at three or more characters.\r
667 -\r
668 -Weekday names can be abbreviated at three or more characters.\r
669 -\r
670 -Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3\r
671 -.RE\r
672 -\r
673 -.RS 4\r
674 -.TP 4\r
675 -.B Time zones\r
676 -(+|-)HH:MM\r
677 -\r
678 -(+|-)HH[MM]\r
679 -\r
680 -Some time zone codes, e.g. UTC, EET.\r
681 -.RE\r
682 -\r
683 -.SH SEE ALSO\r
684 -\r
685 -\fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),\r
686 -\fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),\r
687 -\fBnotmuch-reply\fR(1), \fBnotmuch-restore\fR(1),\r
688 -\fBnotmuch-search\fR(1), \fBnotmuch-show\fR(1), \fBnotmuch-tag\fR(1)\r
689 diff --git a/pod/notmuch-search-terms.pod b/pod/notmuch-search-terms.pod\r
690 new file mode 100644\r
691 index 0000000..d1122b9\r
692 --- /dev/null\r
693 +++ b/pod/notmuch-search-terms.pod\r
694 @@ -0,0 +1,233 @@\r
695 +=head1 Name\r
696 +\r
697 +notmuch-search-terms - syntax for notmuch queries\r
698 +\r
699 +=head1 Synopsis\r
700 +\r
701 +B<notmuch> B<count> [I<options...>] <I<search-term>>...\r
702 +\r
703 +B<notmuch> B<dump> [ <I<filename>> ] [--] [ <I<search-term>>...]\r
704 +\r
705 +B<notmuch> B<search> [I<options>...] <I<search-term>>...\r
706 +\r
707 +B<notmuch> B<show> [I<options>...] <I<search-term>>...\r
708 +\r
709 +B<notmuch> B<tag> +<I<tag>>|-<I<tag>> [...] [--] <I<search-term>>...\r
710 +\r
711 +=head1 Description\r
712 +\r
713 +Several notmuch commands accept a common syntax for search terms.\r
714 +\r
715 +The search terms can consist of free-form text (and quoted phrases)\r
716 +which will match all messages that contain all of the given\r
717 +terms/phrases in the body, the subject, or any of the sender or\r
718 +recipient headers.\r
719 +\r
720 +As a special case, a search string consisting of exactly a single\r
721 +asterisk ("*") will match all messages.\r
722 +\r
723 +In addition to free text, the following prefixes can be used to force\r
724 +terms to match against specific portions of an email, (where <brackets>\r
725 +indicate user-supplied values):\r
726 +\r
727 +from:<name-or-address>\r
728 +\r
729 +to:<name-or-address>\r
730 +\r
731 +subject:<word-or-quoted-phrase>\r
732 +\r
733 +attachment:<word>\r
734 +\r
735 +tag:<tag> (or is:<tag>)\r
736 +\r
737 +id:<message-id>\r
738 +\r
739 +thread:<thread-id>\r
740 +\r
741 +folder:<directory-path>\r
742 +\r
743 +date:<since>..<until>\r
744 +\r
745 +The B<from:> prefix is used to match the name or address of the sender of\r
746 +an email message.\r
747 +\r
748 +The B<to:> prefix is used to match the names or addresses of any recipient\r
749 +of an email message, (whether To, Cc, or Bcc).\r
750 +\r
751 +Any term prefixed with B<subject:> will match only text from the subject\r
752 +of an email. Searching for a phrase in the subject is supported by\r
753 +including quotation marks around the phrase, immediately following\r
754 +B<subject:>.\r
755 +\r
756 +The B<attachment:> prefix can be used to search for specific filenames (or\r
757 +extensions) of attachments to email messages.\r
758 +\r
759 +For B<tag:> and B<is:> valid tag values include B<inbox> and B<unread> by default\r
760 +for new messages added by B<notmuch> B<new> as well as any other tag values\r
761 +added manually with B<notmuch> B<tag>.\r
762 +\r
763 +For B<id:>, message ID values are the literal contents of the Message-ID:\r
764 +header of email messages, but without the `<', `>' delimiters.\r
765 +\r
766 +The B<thread:> prefix can be used with the thread ID values that are\r
767 +generated internally by notmuch (and do not appear in email messages).\r
768 +These thread ID values can be seen in the first column of output from\r
769 +B<notmuch> B<search>\r
770 +\r
771 +The B<folder:> prefix can be used to search for email message files that\r
772 +are contained within particular directories within the mail store. Only\r
773 +the directory components below the top-level mail database path are\r
774 +available to be searched.\r
775 +\r
776 +The B<date:> prefix can be used to restrict the results to only messages\r
777 +within a particular time range (based on the Date: header) with a range\r
778 +syntax of:\r
779 +\r
780 +date:<since>..<until>\r
781 +\r
782 +See B<DATE> B<AND> B<TIME> B<SEARCH> below for details on the range expression, and\r
783 +supported syntax for <since> and <until> date and time expressions.\r
784 +\r
785 +The time range can also be specified using timestamps with a syntax of:\r
786 +\r
787 +<initial-timestamp>..<final-timestamp>\r
788 +\r
789 +Each timestamp is a number representing the number of seconds since\r
790 +1970-01-01 00:00:00 UTC.\r
791 +\r
792 +In addition to individual terms, multiple terms can be combined with\r
793 +Boolean operators ( B<and>, B<or>, B<not> , etc.). Each term in the query will\r
794 +be implicitly connected by a logical AND if no explicit operator is\r
795 +provided, (except that terms with a common prefix will be implicitly\r
796 +combined with OR until we get Xapian defect #402 fixed).\r
797 +\r
798 +Parentheses can also be used to control the combination of the Boolean\r
799 +operators, but will have to be protected from interpretation by the\r
800 +shell, (such as by putting quotation marks around any parenthesized\r
801 +expression).\r
802 +\r
803 +=head1 Date and Time Search\r
804 +\r
805 +notmuch understands a variety of standard and natural ways of\r
806 +expressing dates and times, both in absolute terms ("2012-10-24") and\r
807 +in relative terms ("yesterday"). Any number of relative terms can be\r
808 +combined ("1 hour 25 minutes") and an absolute date/time can be\r
809 +combined with relative terms to further adjust it. A non-exhaustive\r
810 +description of the syntax supported for absolute and relative terms is\r
811 +given below.\r
812 +\r
813 +B<The> B<range> B<expression>\r
814 +\r
815 +date:<since>..<until>\r
816 +\r
817 +The above expression restricts the results to only messages\r
818 +from <since> to <until>, based on the Date: header.\r
819 +\r
820 +<since> and <until> can describe imprecise times, such as\r
821 +"yesterday". In this case, <since> is taken as the earliest\r
822 +time it could describe (the beginning of yesterday) and <until>\r
823 +is taken as the latest time it could describe (the end of\r
824 +yesterday). Similarly, date:january..february matches from the\r
825 +beginning of January to the end of February.\r
826 +\r
827 +Currently, we do not support spaces in range expressions. You\r
828 +can replace the spaces with `_', or (in most cases) `-', or (in\r
829 +some cases) leave the spaces out altogether. Examples in this\r
830 +man page use spaces for clarity.\r
831 +\r
832 +Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's\r
833 +possible to specify date:..<until> or date:<since>.. to not\r
834 +limit the start or end time, respectively. Pre-1.2.1 Xapian\r
835 +does not report an error on open ended ranges, but it does not\r
836 +work as expected either.\r
837 +\r
838 +Entering date:expr without ".." (for example date:yesterday)\r
839 +won't work, as it's not interpreted as a range expression at\r
840 +all. You can achieve the expected result by duplicating the\r
841 +expr both sides of ".." (for example\r
842 +date:yesterday..yesterday).\r
843 +\r
844 +B<Relative> B<date> B<and> B<time>\r
845 +[N|number]\r
846 +(years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs)\r
847 +[...]\r
848 +\r
849 +All refer to past, can be repeated and will be accumulated.\r
850 +\r
851 +Units can be abbreviated to any length, with the otherwise\r
852 +ambiguous single m being m for minutes and M for months.\r
853 +\r
854 +Number can also be written out one, two, ..., ten, dozen,\r
855 +hundred. Additionally, the unit may be preceded by "last" or\r
856 +"this" (e.g., "last week" or "this month").\r
857 +\r
858 +When combined with absolute date and time, the relative date\r
859 +and time specification will be relative from the specified\r
860 +absolute date and time.\r
861 +\r
862 +Examples: 5M2d, two weeks\r
863 +\r
864 +B<Supported> B<absolute> B<time> B<formats>\r
865 +H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
866 +\r
867 +H[H] (am|a.m.|pm|p.m.)\r
868 +\r
869 +=over 5\r
870 +\r
871 +=item HHMMSS\r
872 +\r
873 +=back\r
874 +\r
875 +now\r
876 +\r
877 +noon\r
878 +\r
879 +midnight\r
880 +\r
881 +Examples: 17:05, 5pm\r
882 +\r
883 +B<Supported> B<absolute> B<date> B<formats>\r
884 +YYYY-MM[-DD]\r
885 +\r
886 +=over 5\r
887 +\r
888 +=item DD-MM[-[YY]YY]\r
889 +\r
890 +=item MM-YYYY\r
891 +\r
892 +=item M[M]/D[D][/[YY]YY]\r
893 +\r
894 +=item M[M]/YYYY\r
895 +\r
896 +=item D[D].M[M][.[YY]YY]\r
897 +\r
898 +=back\r
899 +\r
900 +D[D][(st|nd|rd|th)] Mon[thname] [YYYY]\r
901 +\r
902 +Mon[thname] D[D][(st|nd|rd|th)] [YYYY]\r
903 +\r
904 +Wee[kday]\r
905 +\r
906 +Month names can be abbreviated at three or more characters.\r
907 +\r
908 +Weekday names can be abbreviated at three or more characters.\r
909 +\r
910 +Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3\r
911 +\r
912 +B<Time> B<zones>\r
913 +(+|-)HH:MM\r
914 +\r
915 +=over 5\r
916 +\r
917 +=item (+|-)HH[MM]\r
918 +\r
919 +=back\r
920 +\r
921 +Some time zone codes, e.g. UTC, EET.\r
922 +\r
923 +=head1 See Also\r
924 +\r
925 +L<notmuch(1)>, L<notmuch-config(1)>, L<notmuch-count(1)>, L<notmuch-dump(1)>,\r
926 +L<notmuch-hooks(5)>, L<notmuch-new(1)>, L<notmuch-reply(1)>, L<notmuch-restore(1)>,\r
927 +L<notmuch-search(1)>, L<notmuch-show(1)>, L<notmuch-tag(1)>\r
928 diff --git a/pod/notmuch.pod b/pod/notmuch.pod\r
929 new file mode 100644\r
930 index 0000000..3407211\r
931 --- /dev/null\r
932 +++ b/pod/notmuch.pod\r
933 @@ -0,0 +1,149 @@\r
934 +=head1 Name\r
935 +\r
936 +notmuch - thread-based email index, search, and tagging\r
937 +\r
938 +=head1 Synopsis\r
939 +\r
940 +B<notmuch> [I<option> ...] I<command> [I<arg> ...]\r
941 +\r
942 +=head1 Description\r
943 +\r
944 +Notmuch is a command-line based program for indexing, searching,\r
945 +reading, and tagging large collections of email messages.\r
946 +\r
947 +This page describes how to get started using notmuch from the command\r
948 +line, and gives a brief overview of the commands available. For more\r
949 +information on e.g. B<notmuch> B<show> consult the L<notmuch-show(1)> man page,\r
950 +also accessible via B<notmuch> B<help> B<show>\r
951 +\r
952 +The quickest way to get started with Notmuch is to simply invoke the\r
953 +B<notmuch> command with no arguments, which will interactively guide you\r
954 +through the process of indexing your mail.\r
955 +\r
956 +=head1 Note\r
957 +\r
958 +While the command-line program B<notmuch> provides powerful functionality,\r
959 +it does not provide the most convenient interface for that\r
960 +functionality. More sophisticated interfaces are expected to be built\r
961 +on top of either the command-line interface, or more likely, on top of\r
962 +the notmuch library interface. See http://notmuchmail.org for more\r
963 +about alternate interfaces to notmuch. The emacs-based interface to\r
964 +notmuch (available under B<emacs/> in the Notmuch source distribution) is\r
965 +probably the most widely used at this time.\r
966 +\r
967 +=head1 Options\r
968 +\r
969 +Supported global options for B<notmuch> include\r
970 +\r
971 +=over 5\r
972 +\r
973 +=item B<--help>\r
974 +\r
975 +=back\r
976 +\r
977 +Print a synopsis of available commands and exit.\r
978 +\r
979 +=over 5\r
980 +\r
981 +=item B<--version>\r
982 +\r
983 +=back\r
984 +\r
985 +Print the installed version of notmuch, and exit.\r
986 +\r
987 +=over 5\r
988 +\r
989 +=item B<--config=FILE>\r
990 +\r
991 +=back\r
992 +\r
993 +Specify the configuration file to use. This overrides any\r
994 +configuration file specified by ${NOTMUCH_CONFIG}.\r
995 +\r
996 +=head1 Commands\r
997 +\r
998 +B<SETUP>\r
999 +The B<notmuch> B<setup> command is used to configure Notmuch for first use,\r
1000 +(or to reconfigure it later).\r
1001 +\r
1002 +The setup command will prompt for your full name, your primary email\r
1003 +address, any alternate email addresses you use, and the directory\r
1004 +containing your email archives. Your answers will be written to a\r
1005 +configuration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-\r
1006 +config . This configuration file will be created with descriptive\r
1007 +comments, making it easy to edit by hand later to change the\r
1008 +configuration. Or you can run B<notmuch> B<setup> again to change the\r
1009 +configuration.\r
1010 +\r
1011 +The mail directory you specify can contain any number of sub-\r
1012 +directories and should primarily contain only files with individual\r
1013 +email messages (eg. maildir or mh archives are perfect). If there are\r
1014 +other, non-email files (such as indexes maintained by other email\r
1015 +programs) then notmuch will do its best to detect those and ignore\r
1016 +them.\r
1017 +\r
1018 +Mail storage that uses mbox format, (where one mbox file contains many\r
1019 +messages), will not work with notmuch. If that's how your mail is\r
1020 +currently stored, it is recommended you first convert it to maildir\r
1021 +format with a utility such as mb2md before running B<notmuch> B<setup> B<.>\r
1022 +\r
1023 +Invoking B<notmuch> with no command argument will run B<setup> if the setup\r
1024 +command has not previously been completed.\r
1025 +\r
1026 +B<OTHER> B<COMMANDS>\r
1027 +Several of the notmuch commands accept search terms with a common\r
1028 +syntax. See L<notmuch-search-terms(7)> for more details on the supported\r
1029 +syntax.\r
1030 +\r
1031 +The B<search>, B<show> and B<count> commands are used to query the email\r
1032 +database.\r
1033 +\r
1034 +The B<reply> command is useful for preparing a template for an email\r
1035 +reply.\r
1036 +\r
1037 +The B<tag> command is the only command available for manipulating database\r
1038 +contents.\r
1039 +\r
1040 +The B<dump> and B<restore> commands can be used to create a textual dump of\r
1041 +email tags for backup purposes, and to restore from that dump.\r
1042 +\r
1043 +The B<config> command can be used to get or set settings int the notmuch\r
1044 +configuration file.\r
1045 +\r
1046 +=head1 Environment\r
1047 +\r
1048 +The following environment variables can be used to control the behavior\r
1049 +of notmuch.\r
1050 +\r
1051 +=over 5\r
1052 +\r
1053 +=item B<NOTMUCH_CONFIG>\r
1054 +\r
1055 +Specifies the location of the notmuch configuration file.\r
1056 +Notmuch will use ${HOME}/.notmuch-config if this variable is not\r
1057 +set.\r
1058 +\r
1059 +=item B<NOTMUCH_TALLOC_REPORT>\r
1060 +\r
1061 +Location to write a talloc memory usage report. See\r
1062 +B<talloc_enable_leak_report_full> in L<talloc(3)> for more\r
1063 +information.\r
1064 +\r
1065 +=back\r
1066 +\r
1067 +=head1 See Also\r
1068 +\r
1069 +L<notmuch-config(1)>, L<notmuch-count(1)>, L<notmuch-dump(1)>, L<notmuch-hooks(5)>,\r
1070 +L<notmuch-new(1)>, L<notmuch-reply(1)>, L<notmuch-restore(1)>, L<notmuchsearch(1)>,\r
1071 +L<notmuch-search-terms(7)>, L<notmuch-show(1)>, L<notmuch-tag(1)>\r
1072 +\r
1073 +The notmuch website: B<http://notmuchmail.org>\r
1074 +\r
1075 +=head1 Contact\r
1076 +\r
1077 +Feel free to send questions, comments, or kudos to the notmuch mailing\r
1078 +list <notmuch@notmuchmail.org> . Subscription is not required before\r
1079 +posting, but is available from the notmuchmail.org website.\r
1080 +\r
1081 +Real-time interaction with the Notmuch community is available via IRC\r
1082 +(server: irc.freenode.net, channel: #notmuch).\r
1083 -- \r
1084 1.8.2.rc2\r
1085 \r