Re: [feature request] emacs: use `notmuch insert` for FCC
[notmuch-archives.git] / 77 / 2d948e504ee2eed2229bd3166956402f318072
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 2333C431FBD\r
6         for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 08:01:20 -0800 (PST)\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 8FrQxR-Wn8vf for <notmuch@notmuchmail.org>;\r
16         Sat, 18 Jan 2014 08:01:12 -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 620A5431FBC\r
21         for <notmuch@notmuchmail.org>; Sat, 18 Jan 2014 08:01:12 -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 1W4YKa-0000Tb-1c; Sat, 18 Jan 2014 12:01:08 -0400\r
25 Received: (nullmailer pid 31085 invoked by uid 1000); Sat, 18 Jan 2014\r
26         16:01:03 -0000\r
27 From: David Bremner <david@tethera.net>\r
28 To: notmuch@notmuchmail.org\r
29 Subject: [RFC Patch] start of sphinx based docs\r
30 Date: Sat, 18 Jan 2014 12:00:58 -0400\r
31 Message-Id: <1390060858-30905-1-git-send-email-david@tethera.net>\r
32 X-Mailer: git-send-email 1.8.5.2\r
33 MIME-Version: 1.0\r
34 Content-Type: text/plain; charset=UTF-8\r
35 Content-Transfer-Encoding: 8bit\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Sat, 18 Jan 2014 16:01:20 -0000\r
49 \r
50 ---\r
51 \r
52 here is quick and dirty start a sphinx based docs.\r
53 This has the advantage that everything is in rst, no mixed formats.\r
54 \r
55 things you might try, after installing sphinx (only tested with 1.2)\r
56 \r
57 % make -C doc man\r
58 \r
59 % make -C doc info\r
60 \r
61 % man -l doc/_build/man/notmuch-search.1\r
62 \r
63 % info -f doc/_build/texinfo/notmuch-emacs.info\r
64 \r
65  doc/Makefile                 | 177 ++++++++++++++++++++++++++++\r
66  doc/conf.py                  | 272 +++++++++++++++++++++++++++++++++++++++++++\r
67  doc/index.rst                |  24 ++++\r
68  doc/notmuch-emacs.rst        | 188 ++++++++++++++++++++++++++++++\r
69  doc/notmuch-search-terms.rst | 255 ++++++++++++++++++++++++++++++++++++++++\r
70  doc/notmuch-search.rst       | 203 ++++++++++++++++++++++++++++++++\r
71  doc/notmuch.rst              | 173 +++++++++++++++++++++++++++\r
72  7 files changed, 1292 insertions(+)\r
73  create mode 100644 doc/Makefile\r
74  create mode 100644 doc/conf.py\r
75  create mode 100644 doc/index.rst\r
76  create mode 100644 doc/notmuch-emacs.rst\r
77  create mode 100644 doc/notmuch-search-terms.rst\r
78  create mode 100644 doc/notmuch-search.rst\r
79  create mode 100644 doc/notmuch.rst\r
80 \r
81 diff --git a/doc/Makefile b/doc/Makefile\r
82 new file mode 100644\r
83 index 0000000..906268c\r
84 --- /dev/null\r
85 +++ b/doc/Makefile\r
86 @@ -0,0 +1,177 @@\r
87 +# Makefile for Sphinx documentation\r
88 +#\r
89 +\r
90 +# You can set these variables from the command line.\r
91 +SPHINXOPTS    =\r
92 +SPHINXBUILD   = sphinx-build\r
93 +PAPER         =\r
94 +BUILDDIR      = _build\r
95 +\r
96 +# User-friendly check for sphinx-build\r
97 +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)\r
98 +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)\r
99 +endif\r
100 +\r
101 +# Internal variables.\r
102 +PAPEROPT_a4     = -D latex_paper_size=a4\r
103 +PAPEROPT_letter = -D latex_paper_size=letter\r
104 +ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\r
105 +# the i18n builder cannot share the environment and doctrees with the others\r
106 +I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .\r
107 +\r
108 +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext\r
109 +\r
110 +help:\r
111 +       @echo "Please use \`make <target>' where <target> is one of"\r
112 +       @echo "  html       to make standalone HTML files"\r
113 +       @echo "  dirhtml    to make HTML files named index.html in directories"\r
114 +       @echo "  singlehtml to make a single large HTML file"\r
115 +       @echo "  pickle     to make pickle files"\r
116 +       @echo "  json       to make JSON files"\r
117 +       @echo "  htmlhelp   to make HTML files and a HTML help project"\r
118 +       @echo "  qthelp     to make HTML files and a qthelp project"\r
119 +       @echo "  devhelp    to make HTML files and a Devhelp project"\r
120 +       @echo "  epub       to make an epub"\r
121 +       @echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"\r
122 +       @echo "  latexpdf   to make LaTeX files and run them through pdflatex"\r
123 +       @echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"\r
124 +       @echo "  text       to make text files"\r
125 +       @echo "  man        to make manual pages"\r
126 +       @echo "  texinfo    to make Texinfo files"\r
127 +       @echo "  info       to make Texinfo files and run them through makeinfo"\r
128 +       @echo "  gettext    to make PO message catalogs"\r
129 +       @echo "  changes    to make an overview of all changed/added/deprecated items"\r
130 +       @echo "  xml        to make Docutils-native XML files"\r
131 +       @echo "  pseudoxml  to make pseudoxml-XML files for display purposes"\r
132 +       @echo "  linkcheck  to check all external links for integrity"\r
133 +       @echo "  doctest    to run all doctests embedded in the documentation (if enabled)"\r
134 +\r
135 +clean:\r
136 +       rm -rf $(BUILDDIR)/*\r
137 +\r
138 +html:\r
139 +       $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html\r
140 +       @echo\r
141 +       @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."\r
142 +\r
143 +dirhtml:\r
144 +       $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml\r
145 +       @echo\r
146 +       @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."\r
147 +\r
148 +singlehtml:\r
149 +       $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml\r
150 +       @echo\r
151 +       @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."\r
152 +\r
153 +pickle:\r
154 +       $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle\r
155 +       @echo\r
156 +       @echo "Build finished; now you can process the pickle files."\r
157 +\r
158 +json:\r
159 +       $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json\r
160 +       @echo\r
161 +       @echo "Build finished; now you can process the JSON files."\r
162 +\r
163 +htmlhelp:\r
164 +       $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp\r
165 +       @echo\r
166 +       @echo "Build finished; now you can run HTML Help Workshop with the" \\r
167 +             ".hhp project file in $(BUILDDIR)/htmlhelp."\r
168 +\r
169 +qthelp:\r
170 +       $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp\r
171 +       @echo\r
172 +       @echo "Build finished; now you can run "qcollectiongenerator" with the" \\r
173 +             ".qhcp project file in $(BUILDDIR)/qthelp, like this:"\r
174 +       @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/notmuch.qhcp"\r
175 +       @echo "To view the help file:"\r
176 +       @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/notmuch.qhc"\r
177 +\r
178 +devhelp:\r
179 +       $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp\r
180 +       @echo\r
181 +       @echo "Build finished."\r
182 +       @echo "To view the help file:"\r
183 +       @echo "# mkdir -p $$HOME/.local/share/devhelp/notmuch"\r
184 +       @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/notmuch"\r
185 +       @echo "# devhelp"\r
186 +\r
187 +epub:\r
188 +       $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub\r
189 +       @echo\r
190 +       @echo "Build finished. The epub file is in $(BUILDDIR)/epub."\r
191 +\r
192 +latex:\r
193 +       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\r
194 +       @echo\r
195 +       @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."\r
196 +       @echo "Run \`make' in that directory to run these through (pdf)latex" \\r
197 +             "(use \`make latexpdf' here to do that automatically)."\r
198 +\r
199 +latexpdf:\r
200 +       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\r
201 +       @echo "Running LaTeX files through pdflatex..."\r
202 +       $(MAKE) -C $(BUILDDIR)/latex all-pdf\r
203 +       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."\r
204 +\r
205 +latexpdfja:\r
206 +       $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex\r
207 +       @echo "Running LaTeX files through platex and dvipdfmx..."\r
208 +       $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja\r
209 +       @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."\r
210 +\r
211 +text:\r
212 +       $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text\r
213 +       @echo\r
214 +       @echo "Build finished. The text files are in $(BUILDDIR)/text."\r
215 +\r
216 +man:\r
217 +       $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man\r
218 +       @echo\r
219 +       @echo "Build finished. The manual pages are in $(BUILDDIR)/man."\r
220 +\r
221 +texinfo:\r
222 +       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\r
223 +       @echo\r
224 +       @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."\r
225 +       @echo "Run \`make' in that directory to run these through makeinfo" \\r
226 +             "(use \`make info' here to do that automatically)."\r
227 +\r
228 +info:\r
229 +       $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo\r
230 +       @echo "Running Texinfo files through makeinfo..."\r
231 +       make -C $(BUILDDIR)/texinfo info\r
232 +       @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."\r
233 +\r
234 +gettext:\r
235 +       $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale\r
236 +       @echo\r
237 +       @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."\r
238 +\r
239 +changes:\r
240 +       $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes\r
241 +       @echo\r
242 +       @echo "The overview file is in $(BUILDDIR)/changes."\r
243 +\r
244 +linkcheck:\r
245 +       $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck\r
246 +       @echo\r
247 +       @echo "Link check complete; look for any errors in the above output " \\r
248 +             "or in $(BUILDDIR)/linkcheck/output.txt."\r
249 +\r
250 +doctest:\r
251 +       $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest\r
252 +       @echo "Testing of doctests in the sources finished, look at the " \\r
253 +             "results in $(BUILDDIR)/doctest/output.txt."\r
254 +\r
255 +xml:\r
256 +       $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml\r
257 +       @echo\r
258 +       @echo "Build finished. The XML files are in $(BUILDDIR)/xml."\r
259 +\r
260 +pseudoxml:\r
261 +       $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml\r
262 +       @echo\r
263 +       @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."\r
264 diff --git a/doc/conf.py b/doc/conf.py\r
265 new file mode 100644\r
266 index 0000000..d9f7b22\r
267 --- /dev/null\r
268 +++ b/doc/conf.py\r
269 @@ -0,0 +1,272 @@\r
270 +# -*- coding: utf-8 -*-\r
271 +#\r
272 +# notmuch documentation build configuration file, created by\r
273 +# sphinx-quickstart on Fri Jan 17 22:34:14 2014.\r
274 +#\r
275 +# This file is execfile()d with the current directory set to its\r
276 +# containing dir.\r
277 +#\r
278 +# Note that not all possible configuration values are present in this\r
279 +# autogenerated file.\r
280 +#\r
281 +# All configuration values have a default; values that are commented out\r
282 +# serve to show the default.\r
283 +\r
284 +import sys\r
285 +import os\r
286 +\r
287 +# If extensions (or modules to document with autodoc) are in another directory,\r
288 +# add these directories to sys.path here. If the directory is relative to the\r
289 +# documentation root, use os.path.abspath to make it absolute, like shown here.\r
290 +#sys.path.insert(0, os.path.abspath('.'))\r
291 +\r
292 +# -- General configuration ------------------------------------------------\r
293 +\r
294 +# If your documentation needs a minimal Sphinx version, state it here.\r
295 +#needs_sphinx = '1.0'\r
296 +\r
297 +# Add any Sphinx extension module names here, as strings. They can be\r
298 +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom\r
299 +# ones.\r
300 +extensions = []\r
301 +\r
302 +# Add any paths that contain templates here, relative to this directory.\r
303 +templates_path = ['_templates']\r
304 +\r
305 +# The suffix of source filenames.\r
306 +source_suffix = '.rst'\r
307 +\r
308 +# The encoding of source files.\r
309 +#source_encoding = 'utf-8-sig'\r
310 +\r
311 +# The master toctree document.\r
312 +master_doc = 'index'\r
313 +\r
314 +# General information about the project.\r
315 +project = u'notmuch'\r
316 +copyright = u'2014, Carl Worth and many others'\r
317 +\r
318 +# The version info for the project you're documenting, acts as replacement for\r
319 +# |version| and |release|, also used in various other places throughout the\r
320 +# built documents.\r
321 +#\r
322 +# The short X.Y version.\r
323 +version = '0.17'\r
324 +# The full version, including alpha/beta/rc tags.\r
325 +release = '0.17'\r
326 +\r
327 +# The language for content autogenerated by Sphinx. Refer to documentation\r
328 +# for a list of supported languages.\r
329 +#language = None\r
330 +\r
331 +# There are two options for replacing |today|: either, you set today to some\r
332 +# non-false value, then it is used:\r
333 +#today = ''\r
334 +# Else, today_fmt is used as the format for a strftime call.\r
335 +#today_fmt = '%B %d, %Y'\r
336 +\r
337 +# List of patterns, relative to source directory, that match files and\r
338 +# directories to ignore when looking for source files.\r
339 +exclude_patterns = ['_build']\r
340 +\r
341 +# The reST default role (used for this markup: `text`) to use for all\r
342 +# documents.\r
343 +#default_role = None\r
344 +\r
345 +# If true, '()' will be appended to :func: etc. cross-reference text.\r
346 +#add_function_parentheses = True\r
347 +\r
348 +# If true, the current module name will be prepended to all description\r
349 +# unit titles (such as .. function::).\r
350 +#add_module_names = True\r
351 +\r
352 +# If true, sectionauthor and moduleauthor directives will be shown in the\r
353 +# output. They are ignored by default.\r
354 +#show_authors = False\r
355 +\r
356 +# The name of the Pygments (syntax highlighting) style to use.\r
357 +pygments_style = 'sphinx'\r
358 +\r
359 +# A list of ignored prefixes for module index sorting.\r
360 +#modindex_common_prefix = []\r
361 +\r
362 +# If true, keep warnings as "system message" paragraphs in the built documents.\r
363 +#keep_warnings = False\r
364 +\r
365 +\r
366 +# -- Options for HTML output ----------------------------------------------\r
367 +\r
368 +# The theme to use for HTML and HTML Help pages.  See the documentation for\r
369 +# a list of builtin themes.\r
370 +html_theme = 'default'\r
371 +\r
372 +# Theme options are theme-specific and customize the look and feel of a theme\r
373 +# further.  For a list of options available for each theme, see the\r
374 +# documentation.\r
375 +#html_theme_options = {}\r
376 +\r
377 +# Add any paths that contain custom themes here, relative to this directory.\r
378 +#html_theme_path = []\r
379 +\r
380 +# The name for this set of Sphinx documents.  If None, it defaults to\r
381 +# "<project> v<release> documentation".\r
382 +#html_title = None\r
383 +\r
384 +# A shorter title for the navigation bar.  Default is the same as html_title.\r
385 +#html_short_title = None\r
386 +\r
387 +# The name of an image file (relative to this directory) to place at the top\r
388 +# of the sidebar.\r
389 +#html_logo = None\r
390 +\r
391 +# The name of an image file (within the static path) to use as favicon of the\r
392 +# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\r
393 +# pixels large.\r
394 +#html_favicon = None\r
395 +\r
396 +# Add any paths that contain custom static files (such as style sheets) here,\r
397 +# relative to this directory. They are copied after the builtin static files,\r
398 +# so a file named "default.css" will overwrite the builtin "default.css".\r
399 +html_static_path = ['_static']\r
400 +\r
401 +# Add any extra paths that contain custom files (such as robots.txt or\r
402 +# .htaccess) here, relative to this directory. These files are copied\r
403 +# directly to the root of the documentation.\r
404 +#html_extra_path = []\r
405 +\r
406 +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\r
407 +# using the given strftime format.\r
408 +#html_last_updated_fmt = '%b %d, %Y'\r
409 +\r
410 +# If true, SmartyPants will be used to convert quotes and dashes to\r
411 +# typographically correct entities.\r
412 +#html_use_smartypants = True\r
413 +\r
414 +# Custom sidebar templates, maps document names to template names.\r
415 +#html_sidebars = {}\r
416 +\r
417 +# Additional templates that should be rendered to pages, maps page names to\r
418 +# template names.\r
419 +#html_additional_pages = {}\r
420 +\r
421 +# If false, no module index is generated.\r
422 +#html_domain_indices = True\r
423 +\r
424 +# If false, no index is generated.\r
425 +#html_use_index = True\r
426 +\r
427 +# If true, the index is split into individual pages for each letter.\r
428 +#html_split_index = False\r
429 +\r
430 +# If true, links to the reST sources are added to the pages.\r
431 +#html_show_sourcelink = True\r
432 +\r
433 +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.\r
434 +#html_show_sphinx = True\r
435 +\r
436 +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.\r
437 +#html_show_copyright = True\r
438 +\r
439 +# If true, an OpenSearch description file will be output, and all pages will\r
440 +# contain a <link> tag referring to it.  The value of this option must be the\r
441 +# base URL from which the finished HTML is served.\r
442 +#html_use_opensearch = ''\r
443 +\r
444 +# This is the file name suffix for HTML files (e.g. ".xhtml").\r
445 +#html_file_suffix = None\r
446 +\r
447 +# Output file base name for HTML help builder.\r
448 +htmlhelp_basename = 'notmuchdoc'\r
449 +\r
450 +\r
451 +# -- Options for LaTeX output ---------------------------------------------\r
452 +\r
453 +latex_elements = {\r
454 +# The paper size ('letterpaper' or 'a4paper').\r
455 +#'papersize': 'letterpaper',\r
456 +\r
457 +# The font size ('10pt', '11pt' or '12pt').\r
458 +#'pointsize': '10pt',\r
459 +\r
460 +# Additional stuff for the LaTeX preamble.\r
461 +#'preamble': '',\r
462 +}\r
463 +\r
464 +# Grouping the document tree into LaTeX files. List of tuples\r
465 +# (source start file, target name, title,\r
466 +#  author, documentclass [howto, manual, or own class]).\r
467 +latex_documents = [\r
468 +  ('index', 'notmuch.tex', u'notmuch Documentation',\r
469 +   u'Carl Worth and many others', 'manual'),\r
470 +]\r
471 +\r
472 +# The name of an image file (relative to this directory) to place at the top of\r
473 +# the title page.\r
474 +#latex_logo = None\r
475 +\r
476 +# For "manual" documents, if this is true, then toplevel headings are parts,\r
477 +# not chapters.\r
478 +#latex_use_parts = False\r
479 +\r
480 +# If true, show page references after internal links.\r
481 +#latex_show_pagerefs = False\r
482 +\r
483 +# If true, show URL addresses after external links.\r
484 +#latex_show_urls = False\r
485 +\r
486 +# Documents to append as an appendix to all manuals.\r
487 +#latex_appendices = []\r
488 +\r
489 +# If false, no module index is generated.\r
490 +#latex_domain_indices = True\r
491 +\r
492 +\r
493 +# -- Options for manual page output ---------------------------------------\r
494 +\r
495 +# One entry per manual page. List of tuples\r
496 +# (source start file, name, description, authors, manual section).\r
497 +man_pages = [\r
498 +    ('notmuch', 'notmuch', u'thread-based email index, search, and tagging',\r
499 +     [u'Carl Worth and many others'], 1),\r
500 +    ('notmuch-search', 'notmuch-search', u'search the notmuch mail index',\r
501 +     [u'Carl Worth and many others'], 1),\r
502 +    ('notmuch-search-terms', 'notmuch-search-terms', u'query format for notmuch',\r
503 +     [u'Carl Worth and many others'], 7),\r
504 +\r
505 +]\r
506 +\r
507 +# If true, show URL addresses after external links.\r
508 +#man_show_urls = False\r
509 +\r
510 +\r
511 +# -- Options for Texinfo output -------------------------------------------\r
512 +\r
513 +# Grouping the document tree into Texinfo files. List of tuples\r
514 +# (source start file, target name, title, author,\r
515 +#  dir menu entry, description, category)\r
516 +texinfo_documents = [\r
517 +  ('notmuch', 'notmuch', u'notmuch Documentation',\r
518 +   u'Carl Worth and many others', 'notmuch', 'thread-based email index, search and tagging',\r
519 +   'Miscellaneous'),\r
520 +  ('notmuch-emacs', 'notmuch-emacs', u'notmuch Documentation',\r
521 +   u'Carl Worth and many others', 'notmuch-emacs', 'emacs based front-end for notmuch',\r
522 +   'Miscellaneous'),\r
523 +  ('notmuch-search', 'notmuch-search', u'notmuch Documentation',\r
524 +   u'Carl Worth and many others', 'notmuch-search', 'search the notmuch mail index.',\r
525 +   'Miscellaneous'),\r
526 +  ('notmuch-search-terms', 'notmuch-search-terms', u'notmuch Documentation',\r
527 +   u'Carl Worth and many others', 'notmuch-search-terms', 'query syntax for notmuch.',\r
528 +   'Miscellaneous'),\r
529 +]\r
530 +\r
531 +# Documents to append as an appendix to all manuals.\r
532 +#texinfo_appendices = []\r
533 +\r
534 +# If false, no module index is generated.\r
535 +#texinfo_domain_indices = True\r
536 +\r
537 +# How to display URL addresses: 'footnote', 'no', or 'inline'.\r
538 +#texinfo_show_urls = 'footnote'\r
539 +\r
540 +# If true, do not generate a @detailmenu in the "Top" node's menu.\r
541 +texinfo_no_detailmenu = True\r
542 diff --git a/doc/index.rst b/doc/index.rst\r
543 new file mode 100644\r
544 index 0000000..c05c855\r
545 --- /dev/null\r
546 +++ b/doc/index.rst\r
547 @@ -0,0 +1,24 @@\r
548 +.. notmuch documentation master file, created by\r
549 +   sphinx-quickstart on Fri Jan 17 22:34:14 2014.\r
550 +   You can adapt this file completely to your liking, but it should at least\r
551 +   contain the root `toctree` directive.\r
552 +\r
553 +Welcome to notmuch's documentation!\r
554 +===================================\r
555 +\r
556 +Contents:\r
557 +\r
558 +.. toctree::\r
559 +   :maxdepth: 2\r
560 +\r
561 +   notmuch\r
562 +   notmuch-emacs\r
563 +   notmuch-search\r
564 +   notmuch-search-terms\r
565 +\r
566 +Indices and tables\r
567 +==================\r
568 +\r
569 +* :ref:`genindex`\r
570 +* :ref:`modindex`\r
571 +* :ref:`search`\r
572 diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst\r
573 new file mode 100644\r
574 index 0000000..283bf69\r
575 --- /dev/null\r
576 +++ b/doc/notmuch-emacs.rst\r
577 @@ -0,0 +1,188 @@\r
578 +About this Manual\r
579 +=================\r
580 +\r
581 +This manual covers only the emacs interface to notmuch. For information\r
582 +on the command line interface, see See section “Description” in Notmuch\r
583 +Manual Pager. To save typing, we will sometimes use *notmuch* in this\r
584 +manual to refer to the Emacs interface to notmuch. If the distinction\r
585 +should every be important, we’ll refer to the Emacs inteface as\r
586 +*notmuch-emacs*.\r
587 +\r
588 +Notmuch-emacs is highly customizable via the the Emacs customization\r
589 +framework (or just by setting the appropriate variables). We try to\r
590 +point out relevant variables in this manual, but in order to avoid\r
591 +duplication of information, but you can usually find the most detailed\r
592 +description in the varables docstring.\r
593 +\r
594 +notmuch-hello\r
595 +=============\r
596 +\r
597 +.. index::\r
598 +   single: notmuch-hello\r
599 +   single: notmuch\r
600 +\r
601 +``notmuch-hello`` is the main entry point for notmuch. You can start it\r
602 +with ``M-x notmuch`` or ``M-x notmuch-hello``. The startup screen looks\r
603 +something like the following. There are some hints at the bottom of the\r
604 +screen. There are three main parts to the notmuch-hello screen,\r
605 +discussed below. The **bold** text indicates buttons you can click with\r
606 +a mouse or by positioning the cursor and pressing ``<return>``\r
607 +\r
608 +|   Welcome to **notmuch** You have 52 messages.\r
609 +|\r
610 +| Saved searches: **[edit]**\r
611 +|\r
612 +|        52 **inbox**           52 **unread**\r
613 +|\r
614 +| Search: ____________________________________\r
615 +|\r
616 +| All tags: **[show]**\r
617 +|\r
618 +|       Type a search query and hit RET to view matching threads.\r
619 +|              Edit saved searches with the ``edit`` button.\r
620 +| Hit RET or click on a saved search or tag name to view matching threads.\r
621 +|     ``=`` to refresh this screen. ``s`` to search messages. ``q`` to quit.\r
622 +|                  **Customize** this page.\r
623 +\r
624 +You can change the overall appearence of the notmuch-hello screen by\r
625 +customizing the variable :index:`notmuch-hello-sections`.\r
626 +\r
627 +\r
628 +\r
629 +notmuch-hello key bindings\r
630 +--------------------------\r
631 +\r
632 +``<tab>``\r
633 +    Move to the next widget (button or text entry field)\r
634 +\r
635 +``<backtab>``\r
636 +    Move to the previous widget.\r
637 +\r
638 +``<return>``\r
639 +    Activate the current widget.\r
640 +\r
641 +``=``\r
642 +    Refresh the buffer; mainly update the counts of messages for various\r
643 +    saved searches.\r
644 +\r
645 +``G``\r
646 +    Import mail, See :ref:`importing`\r
647 +\r
648 +``m``\r
649 +    Compose a message\r
650 +\r
651 +``s``\r
652 +    Search the notmuch database using :ref:`notmuch-search`\r
653 +\r
654 +``v``\r
655 +    Print notmuch version\r
656 +\r
657 +``q``\r
658 +    Quit\r
659 +\r
660 +.. _saved-searches:\r
661 +\r
662 +Saved Searches\r
663 +--------------\r
664 +\r
665 +Notmuch replaces the static assignment of messages with the more dynamic\r
666 +notion of searching. Notmuch-hello presents the user with a customizable\r
667 +set of saved searchs. The initial defaults are ``tag:inbox`` and\r
668 +``tag:unread``, but you can customize the following variables\r
669 +\r
670 +:index:`notmuch-saved-searches`\r
671 +    A list of cons pairs, the first being the name to display, the\r
672 +    second being a query string for notmuch. See section “Description”\r
673 +    in Notmuch Query Syntax.\r
674 +\r
675 +:index:`notmuch-saved-searches-sort-function`\r
676 +    This variable controls how saved searches should be sorted. A value\r
677 +    of ``nil`` displays the saved searches in the order they are stored\r
678 +    in ‘notmuch-saved-searches’.\r
679 +\r
680 +:index:`notmuch-column-control`\r
681 +    Controls the number of columns for displaying saved-searches/tags\r
682 +\r
683 +Search Box\r
684 +----------\r
685 +\r
686 +The search box lets the user enter an notmuch query. See section\r
687 +“Description” in Notmuch Query Syntax, for more info on notmuch query\r
688 +syntax. A history of recent searches is also displayed by default. The\r
689 +latter is controlled by the variable :index:`notmuch-hello-recent-searches-max`.\r
690 +\r
691 +Known Tags\r
692 +----------\r
693 +\r
694 +One special kind of saved search provided by default is for each\r
695 +individual tag defined in the database. This can be controlled via the\r
696 +following variables.\r
697 +\r
698 +:index:`notmuch-hello-tag-list-make-query`\r
699 +    Control how to construct a search (“virtual folder”) from a given\r
700 +    tag.\r
701 +\r
702 +:index:`notmuch-hello-hide-tags`\r
703 +    Which tags not to display at all.\r
704 +\r
705 +:index:`notmuch-column-control`\r
706 +    Controls the number of columns for displaying saved-searches/tags\r
707 +\r
708 +.. _notmuch-search:\r
709 +\r
710 +notmuch-search\r
711 +==============\r
712 +\r
713 +``notmuch-search-mode`` is used to display the results from executing\r
714 +a query via ``notmuch-search``. The syntax for these queries is the\r
715 +the same as :ref:`saved-searches`. For details of this syntax see\r
716 +info:notmuch-search-terms\r
717 +\r
718 +By default the output approximates that of the command line See section\r
719 +“Description” in notmuch search command.\r
720 +\r
721 +The main purpose of the ``notmuch-search-mode`` buffer is to act as a\r
722 +menu of results that the user can explore further by pressing\r
723 +``<return>`` on the appropriate line.\r
724 +\r
725 +``n,C-n,<down>``\r
726 +    Move to next line\r
727 +\r
728 +``p,C-p,<up>``\r
729 +    Move to previous line\r
730 +\r
731 +``<return>``\r
732 +    Open thread on current line in :ref:`notmuch-show` mode\r
733 +\r
734 +``?``\r
735 +    Display full set of key bindings\r
736 +\r
737 +The presentation of results can be controlled by the following\r
738 +variables.\r
739 +\r
740 +:index:`notmuch-search-result-format`\r
741 +    Control how each thread of messages is presented in the\r
742 +    ``notmuch-show-mode`` buffer\r
743 +\r
744 +:index:`notmuch-search-oldest-first`\r
745 +    Display the oldest threads at the top of the buffer\r
746 +\r
747 +.. _notmuch-show:\r
748 +\r
749 +notmuch-show\r
750 +============\r
751 +\r
752 +notmuch-tree\r
753 +============\r
754 +\r
755 +Configuration\r
756 +=============\r
757 +\r
758 +.. _importing:\r
759 +\r
760 +Importing Mail\r
761 +--------------\r
762 +\r
763 +:index:`notmuch-poll`\r
764 +\r
765 +:index:`notmuch-poll-script`\r
766 diff --git a/doc/notmuch-search-terms.rst b/doc/notmuch-search-terms.rst\r
767 new file mode 100644\r
768 index 0000000..7885c6a\r
769 --- /dev/null\r
770 +++ b/doc/notmuch-search-terms.rst\r
771 @@ -0,0 +1,255 @@\r
772 +====================\r
773 +notmuch-search-terms\r
774 +====================\r
775 +\r
776 +********\r
777 +Synopsis\r
778 +********\r
779 +\r
780 +\r
781 +\ **notmuch**\  \ **count**\  [\ *options...*\ ] <\ *search-term*\ >...\r
782 +\r
783 +\ **notmuch**\  \ **dump**\  [ <\ *filename*\ > ] [--] [ <\ *search-term*\ >...]\r
784 +\r
785 +\ **notmuch**\  \ **search**\  [\ *options*\ ...] <\ *search-term*\ >...\r
786 +\r
787 +\ **notmuch**\  \ **show**\  [\ *options*\ ...] <\ *search-term*\ >...\r
788 +\r
789 +\ **notmuch**\  \ **tag**\  +<\ *tag*\ >|-<\ *tag*\ > [...] [--] <\ *search-term*\ >...\r
790 +\r
791 +\r
792 +***********\r
793 +Description\r
794 +***********\r
795 +\r
796 +\r
797 +Several notmuch commands accept a common syntax for search terms.\r
798 +\r
799 +The search terms can consist of free-form text (and quoted phrases)\r
800 +which will match all messages that contain all of the given\r
801 +terms/phrases in the body, the subject, or any of the sender or\r
802 +recipient headers.\r
803 +\r
804 +As a special case, a search string consisting of exactly a single\r
805 +asterisk ("\*") will match all messages.\r
806 +\r
807 +In addition to free text, the following prefixes can be used to force\r
808 +terms to match against specific portions of an email, (where <brackets>\r
809 +indicate user-supplied values):\r
810 +\r
811 +from:<name-or-address>\r
812 +\r
813 +to:<name-or-address>\r
814 +\r
815 +subject:<word-or-quoted-phrase>\r
816 +\r
817 +attachment:<word>\r
818 +\r
819 +tag:<tag> (or is:<tag>)\r
820 +\r
821 +id:<message-id>\r
822 +\r
823 +thread:<thread-id>\r
824 +\r
825 +folder:<directory-path>\r
826 +\r
827 +date:<since>..<until>\r
828 +\r
829 +The \ **from:**\  prefix is used to match the name or address of the sender of\r
830 +an email message.\r
831 +\r
832 +The \ **to:**\  prefix is used to match the names or addresses of any recipient\r
833 +of an email message, (whether To, Cc, or Bcc).\r
834 +\r
835 +Any term prefixed with \ **subject:**\  will match only text from the subject\r
836 +of an email. Searching for a phrase in the subject is supported by\r
837 +including quotation marks around the phrase, immediately following\r
838 +\ **subject:**\ .\r
839 +\r
840 +The \ **attachment:**\  prefix can be used to search for specific filenames (or\r
841 +extensions) of attachments to email messages.\r
842 +\r
843 +For \ **tag:**\  and \ **is:**\  valid tag values include \ **inbox**\  and \ **unread**\  by default\r
844 +for new messages added by \ **notmuch**\  \ **new**\  as well as any other tag values\r
845 +added manually with \ **notmuch**\  \ **tag**\ .\r
846 +\r
847 +For \ **id:**\ , message ID values are the literal contents of the Message-ID:\r
848 +header of email messages, but without the \`<', \`>' delimiters.\r
849 +\r
850 +The \ **thread:**\  prefix can be used with the thread ID values that are\r
851 +generated internally by notmuch (and do not appear in email messages).\r
852 +These thread ID values can be seen in the first column of output from\r
853 +\ **notmuch**\  \ **search**\\r
854 +\r
855 +The \ **folder:**\  prefix can be used to search for email message files that\r
856 +are contained within particular directories within the mail store. If\r
857 +the same email message has multiple message files associated with it,\r
858 +it's sufficient for a match that at least one of the files is contained\r
859 +within a matching directory. Only the directory components below the\r
860 +top-level mail database path are available to be searched.\r
861 +\r
862 +The \ **date:**\  prefix can be used to restrict the results to only messages\r
863 +within a particular time range (based on the Date: header) with a range\r
864 +syntax of:\r
865 +\r
866 +date:<since>..<until>\r
867 +\r
868 +See \ **DATE**\  \ **AND**\  \ **TIME**\  \ **SEARCH**\  below for details on the range expression, and\r
869 +supported syntax for <since> and <until> date and time expressions.\r
870 +\r
871 +The time range can also be specified using timestamps with a syntax of:\r
872 +\r
873 +<initial-timestamp>..<final-timestamp>\r
874 +\r
875 +Each timestamp is a number representing the number of seconds since\r
876 +1970-01-01 00:00:00 UTC.\r
877 +\r
878 +In addition to individual terms, multiple terms can be combined with\r
879 +Boolean operators ( \ **and**\ , \ **or**\ , \ **not**\  , etc.). Each term in the query will\r
880 +be implicitly connected by a logical AND if no explicit operator is\r
881 +provided, (except that terms with a common prefix will be implicitly\r
882 +combined with OR until we get Xapian defect #402 fixed).\r
883 +\r
884 +Parentheses can also be used to control the combination of the Boolean\r
885 +operators, but will have to be protected from interpretation by the\r
886 +shell, (such as by putting quotation marks around any parenthesized\r
887 +expression).\r
888 +\r
889 +\r
890 +********************\r
891 +Date and Time Search\r
892 +********************\r
893 +\r
894 +\r
895 +notmuch understands a variety of standard and natural ways of\r
896 +expressing dates and times, both in absolute terms ("2012-10-24") and\r
897 +in relative terms ("yesterday"). Any number of relative terms can be\r
898 +combined ("1 hour 25 minutes") and an absolute date/time can be\r
899 +combined with relative terms to further adjust it. A non-exhaustive\r
900 +description of the syntax supported for absolute and relative terms is\r
901 +given below.\r
902 +\r
903 +\ **The**\  \ **range**\  \ **expression**\\r
904 +\r
905 +date:<since>..<until>\r
906 +\r
907 +The above expression restricts the results to only messages\r
908 +from <since> to <until>, based on the Date: header.\r
909 +\r
910 +<since> and <until> can describe imprecise times, such as\r
911 +"yesterday". In this case, <since> is taken as the earliest\r
912 +time it could describe (the beginning of yesterday) and <until>\r
913 +is taken as the latest time it could describe (the end of\r
914 +yesterday). Similarly, date:january..february matches from the\r
915 +beginning of January to the end of February.\r
916 +\r
917 +Currently, we do not support spaces in range expressions. You\r
918 +can replace the spaces with \`_', or (in most cases) \`-', or (in\r
919 +some cases) leave the spaces out altogether. Examples in this\r
920 +man page use spaces for clarity.\r
921 +\r
922 +Open-ended ranges are supported (since Xapian 1.2.1), i.e. it's\r
923 +possible to specify date:..<until> or date:<since>.. to not\r
924 +limit the start or end time, respectively. Pre-1.2.1 Xapian\r
925 +does not report an error on open ended ranges, but it does not\r
926 +work as expected either.\r
927 +\r
928 +Entering date:expr without ".." (for example date:yesterday)\r
929 +won't work, as it's not interpreted as a range expression at\r
930 +all. You can achieve the expected result by duplicating the\r
931 +expr both sides of ".." (for example\r
932 +date:yesterday..yesterday).\r
933 +\r
934 +\ **Relative**\  \ **date**\  \ **and**\  \ **time**\\r
935 +[N|number]\r
936 +(years|months|weeks|days|hours|hrs|minutes|mins|seconds|secs)\r
937 +[...]\r
938 +\r
939 +All refer to past, can be repeated and will be accumulated.\r
940 +\r
941 +Units can be abbreviated to any length, with the otherwise\r
942 +ambiguous single m being m for minutes and M for months.\r
943 +\r
944 +Number can also be written out one, two, ..., ten, dozen,\r
945 +hundred. Additionally, the unit may be preceded by "last" or\r
946 +"this" (e.g., "last week" or "this month").\r
947 +\r
948 +When combined with absolute date and time, the relative date\r
949 +and time specification will be relative from the specified\r
950 +absolute date and time.\r
951 +\r
952 +Examples: 5M2d, two weeks\r
953 +\r
954 +\ **Supported**\  \ **absolute**\  \ **time**\  \ **formats**\\r
955 +H[H]:MM[:SS] [(am|a.m.|pm|p.m.)]\r
956 +\r
957 +H[H] (am|a.m.|pm|p.m.)\r
958 +\r
959 +\r
960 +HHMMSS\r
961 +\r
962 +\r
963 +\r
964 +now\r
965 +\r
966 +noon\r
967 +\r
968 +midnight\r
969 +\r
970 +Examples: 17:05, 5pm\r
971 +\r
972 +\ **Supported**\  \ **absolute**\  \ **date**\  \ **formats**\\r
973 +YYYY-MM[-DD]\r
974 +\r
975 +\r
976 +DD-MM[-[YY]YY]\r
977 +\r
978 +\r
979 +\r
980 +MM-YYYY\r
981 +\r
982 +\r
983 +\r
984 +M[M]/D[D][/[YY]YY]\r
985 +\r
986 +\r
987 +\r
988 +M[M]/YYYY\r
989 +\r
990 +\r
991 +\r
992 +D[D].M[M][.[YY]YY]\r
993 +\r
994 +\r
995 +\r
996 +D[D][(st|nd|rd|th)] Mon[thname] [YYYY]\r
997 +\r
998 +Mon[thname] D[D][(st|nd|rd|th)] [YYYY]\r
999 +\r
1000 +Wee[kday]\r
1001 +\r
1002 +Month names can be abbreviated at three or more characters.\r
1003 +\r
1004 +Weekday names can be abbreviated at three or more characters.\r
1005 +\r
1006 +Examples: 2012-07-31, 31-07-2012, 7/31/2012, August 3\r
1007 +\r
1008 +\ **Time**\  \ **zones**\\r
1009 +(+|-)HH:MM\r
1010 +\r
1011 +\r
1012 +(+|-)HH[MM]\r
1013 +\r
1014 +\r
1015 +\r
1016 +Some time zone codes, e.g. UTC, EET.\r
1017 +\r
1018 +\r
1019 +********\r
1020 +See Also\r
1021 +********\r
1022 +\r
1023 +\r
1024 +notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1),\r
1025 +notmuch-hooks(5), notmuch-insert(1), notmuch-new(1), notmuch-reply(1),\r
1026 +notmuch-restore(1), notmuch-search(1), notmuch-show(1), notmuch-tag(1)\r
1027 diff --git a/doc/notmuch-search.rst b/doc/notmuch-search.rst\r
1028 new file mode 100644\r
1029 index 0000000..deb7e8b\r
1030 --- /dev/null\r
1031 +++ b/doc/notmuch-search.rst\r
1032 @@ -0,0 +1,203 @@\r
1033 +==============\r
1034 +notmuch-search\r
1035 +==============\r
1036 +\r
1037 +\r
1038 +********\r
1039 +Synopsis\r
1040 +********\r
1041 +\r
1042 +\r
1043 +\ **notmuch**\  \ **search**\  [\ *options*\ ...] <\ *search-term*\ >...\r
1044 +\r
1045 +\r
1046 +***********\r
1047 +Description\r
1048 +***********\r
1049 +\r
1050 +\r
1051 +Search for messages matching the given search terms, and display as\r
1052 +results the threads containing the matched messages.\r
1053 +\r
1054 +The output consists of one line per thread, giving a thread ID, the\r
1055 +date of the newest (or oldest, depending on the sort option) matched\r
1056 +message in the thread, the number of matched messages and total\r
1057 +messages in the thread, the names of all participants in the thread,\r
1058 +and the subject of the newest (or oldest) message.\r
1059 +\r
1060 +See notmuch-search-terms(7) for details of the supported syntax for\r
1061 +<search-terms>.\r
1062 +\r
1063 +Supported options for \ **search**\  include\r
1064 +\r
1065 +\r
1066 +  **--format=** ( **json** | **sexp** | **text** |  **text0** )\r
1067 +\r
1068 +\r
1069 +\r
1070 +Presents the results in either JSON, S-Expressions, newline\r
1071 +character separated plain-text (default), or null character\r
1072 +separated plain-text (compatible with xargs(1) -0 option where\r
1073 +available).\r
1074 +\r
1075 +\r
1076 +\ **--format-version=N**\\r
1077 +\r
1078 +\r
1079 +\r
1080 +Use the specified structured output format version. This is\r
1081 +intended for programs that invoke notmuch(1) internally. If\r
1082 +omitted, the latest supported version will be used.\r
1083 +\r
1084 +\r
1085 +\ **--output=(summary|threads|messages|files|tags)**\\r
1086 +\r
1087 +\r
1088 +\r
1089 +\ **summary**\\r
1090 +\r
1091 +Output a summary of each thread with any message matching\r
1092 +the search terms. The summary includes the thread ID, date,\r
1093 +the number of messages in the thread (both the number\r
1094 +matched and the total number), the authors of the thread\r
1095 +and the subject.\r
1096 +\r
1097 +\ **threads**\\r
1098 +\r
1099 +Output the thread IDs of all threads with any message\r
1100 +matching the search terms, either one per line\r
1101 +(--format=text), separated by null characters\r
1102 +(--format=text0), as a JSON array (--format=json), or an S-\r
1103 +Expression list (--format=sexp).\r
1104 +\r
1105 +\ **messages**\\r
1106 +\r
1107 +Output the message IDs of all messages matching the search\r
1108 +terms, either one per line (--format=text), separated by\r
1109 +null characters (--format=text0), as a JSON array\r
1110 +(--format=json), or as an S-Expression list\r
1111 +(--format=sexp).\r
1112 +\r
1113 +\ **files**\\r
1114 +\r
1115 +Output the filenames of all messages matching the search\r
1116 +terms, either one per line (--format=text), separated by\r
1117 +null characters (--format=text0), as a JSON array\r
1118 +(--format=json), or as an S-Expression list\r
1119 +(--format=sexp).\r
1120 +\r
1121 +Note that each message may have multiple filenames\r
1122 +associated with it. All of them are included in the\r
1123 +output, unless limited with the --duplicate=N option.\r
1124 +\r
1125 +\ **tags**\\r
1126 +\r
1127 +Output all tags that appear on any message matching the\r
1128 +search terms, either one per line (--format=text),\r
1129 +separated by null characters (--format=text0), as a JSON\r
1130 +array (--format=json), or as an S-Expression list\r
1131 +(--format=sexp).\r
1132 +\r
1133 +\r
1134 +\ **--sort=** (\ **newest-first** | **oldest-first** )\r
1135 +\r
1136 +\r
1137 +\r
1138 +This option can be used to present results in either\r
1139 +chronological order (\ **oldest-first**\ ) or reverse chronological\r
1140 +order (\ **newest-first**\ ).\r
1141 +\r
1142 +Note: The thread order will be distinct between these two\r
1143 +options (beyond being simply reversed). When sorting by\r
1144 +\ **oldest-first**\  the threads will be sorted by the oldest message\r
1145 +in each thread, but when sorting by \ **newest-first**\  the threads\r
1146 +will be sorted by the newest message in each thread.\r
1147 +\r
1148 +By default, results will be displayed in reverse chronological\r
1149 +order, (that is, the newest results will be displayed first).\r
1150 +\r
1151 +\r
1152 +\ **--offset=[-]N**\\r
1153 +\r
1154 +\r
1155 +\r
1156 +Skip displaying the first N results. With the leading \`-',\r
1157 +start at the Nth result from the end.\r
1158 +\r
1159 +\r
1160 +\ **--limit=N**\\r
1161 +\r
1162 +\r
1163 +\r
1164 +Limit the number of displayed results to N.\r
1165 +\r
1166 +\r
1167 +\ **--exclude=(true|false|all|flag)**\\r
1168 +\r
1169 +\r
1170 +\r
1171 +A message is called "excluded" if it matches at least one tag\r
1172 +in search.tag_exclude that does not appear explicitly in the\r
1173 +search terms. This option specifies whether to omit excluded\r
1174 +messages in the search process.\r
1175 +\r
1176 +The default value, \ **true**\ , prevents excluded messages from\r
1177 +matching the search terms.\r
1178 +\r
1179 +\ **all**\  additionally prevents excluded messages from appearing in\r
1180 +displayed results, in effect behaving as though the excluded\r
1181 +messages do not exist.\r
1182 +\r
1183 +\ **false**\  allows excluded messages to match search terms and appear\r
1184 +in displayed results. Excluded messages are still marked in the\r
1185 +relevant outputs.\r
1186 +\r
1187 +\ **flag**\  only has an effect when \ **--output=summary**\ . The output is\r
1188 +almost identical to \ **false**\ , but the "match count" is the number\r
1189 +of matching non-excluded messages in the thread, rather than\r
1190 +the number of matching messages.\r
1191 +\r
1192 +\r
1193 +\ **--duplicate=N**\\r
1194 +\r
1195 +\r
1196 +\r
1197 +Effective with \ **--output=files**\ , output the Nth filename\r
1198 +associated with each message matching the query (N is 1-based).\r
1199 +If N is greater than the number of files associated with the\r
1200 +message, don't print anything.\r
1201 +\r
1202 +Note that this option is orthogonal with the \ **folder:**\  search\r
1203 +prefix. The prefix matches messages based on filenames. This\r
1204 +option filters filenames of the matching messages.\r
1205 +\r
1206 +\r
1207 +***********\r
1208 +Exit Status\r
1209 +***********\r
1210 +\r
1211 +\r
1212 +This command supports the following special exit status codes\r
1213 +\r
1214 +\r
1215 +\ **20**\\r
1216 +\r
1217 +   The requested format version is too old.\r
1218 +\r
1219 +\r
1220 +\ **21**\\r
1221 +\r
1222 +   The requested format version is too new.\r
1223 +\r
1224 +\r
1225 +\r
1226 +\r
1227 +\r
1228 +********\r
1229 +See Also\r
1230 +********\r
1231 +\r
1232 +\r
1233 +notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1),\r
1234 +notmuch-hooks(5), notmuch-insert(1), notmuch-new(1), notmuch-reply(1),\r
1235 +notmuch-restore(1), notmuch-search-terms(7), notmuch-show(1), notmuchtag(1)\r
1236 diff --git a/doc/notmuch.rst b/doc/notmuch.rst\r
1237 new file mode 100644\r
1238 index 0000000..9d9a35c\r
1239 --- /dev/null\r
1240 +++ b/doc/notmuch.rst\r
1241 @@ -0,0 +1,173 @@\r
1242 +========\r
1243 +notmuch\r
1244 +========\r
1245 +\r
1246 +Synopsis\r
1247 +========\r
1248 +\r
1249 +\r
1250 +\ **notmuch**\  [\ *option*\  ...] \ *command*\  [\ *arg*\  ...]\r
1251 +\r
1252 +\r
1253 +Description\r
1254 +===========\r
1255 +\r
1256 +\r
1257 +Notmuch is a command-line based program for indexing, searching,\r
1258 +reading, and tagging large collections of email messages.\r
1259 +\r
1260 +This page describes how to get started using notmuch from the command\r
1261 +line, and gives a brief overview of the commands available. For more\r
1262 +information on e.g. \ **notmuch**\  \ **show**\  consult the notmuch-show(1) man page,\r
1263 +also accessible via \ **notmuch**\  \ **help**\  \ **show**\\r
1264 +\r
1265 +The quickest way to get started with Notmuch is to simply invoke the\r
1266 +\ **notmuch**\  command with no arguments, which will interactively guide you\r
1267 +through the process of indexing your mail.\r
1268 +\r
1269 +Note\r
1270 +====\r
1271 +\r
1272 +\r
1273 +While the command-line program \ **notmuch**\  provides powerful functionality,\r
1274 +it does not provide the most convenient interface for that\r
1275 +functionality. More sophisticated interfaces are expected to be built\r
1276 +on top of either the command-line interface, or more likely, on top of\r
1277 +the notmuch library interface. See http://notmuchmail.org for more\r
1278 +about alternate interfaces to notmuch. The emacs-based interface to\r
1279 +notmuch (available under \ **emacs/**\  in the Notmuch source distribution) is\r
1280 +probably the most widely used at this time.\r
1281 +\r
1282 +Options\r
1283 +========\r
1284 +\r
1285 +\r
1286 +Supported global options for \ **notmuch**\  include\r
1287 +\r
1288 +\r
1289 +\ **--help**\\r
1290 +\r
1291 +\r
1292 +\r
1293 +Print a synopsis of available commands and exit.\r
1294 +\r
1295 +\r
1296 +\ **--version**\\r
1297 +\r
1298 +\r
1299 +\r
1300 +Print the installed version of notmuch, and exit.\r
1301 +\r
1302 +\r
1303 +\ **--config=FILE**\\r
1304 +\r
1305 +\r
1306 +\r
1307 +Specify the configuration file to use. This overrides any\r
1308 +configuration file specified by ${NOTMUCH_CONFIG}.\r
1309 +\r
1310 +Commands\r
1311 +========\r
1312 +\r
1313 +\r
1314 +\ **SETUP**\\r
1315 +The \ **notmuch**\  \ **setup**\  command is used to configure Notmuch for first use,\r
1316 +(or to reconfigure it later).\r
1317 +\r
1318 +The setup command will prompt for your full name, your primary email\r
1319 +address, any alternate email addresses you use, and the directory\r
1320 +containing your email archives. Your answers will be written to a\r
1321 +configuration file in ${NOTMUCH_CONFIG} (if set) or ${HOME}/.notmuch-\r
1322 +config . This configuration file will be created with descriptive\r
1323 +comments, making it easy to edit by hand later to change the\r
1324 +configuration. Or you can run \ **notmuch**\  \ **setup**\  again to change the\r
1325 +configuration.\r
1326 +\r
1327 +The mail directory you specify can contain any number of sub-\r
1328 +directories and should primarily contain only files with individual\r
1329 +email messages (eg. maildir or mh archives are perfect). If there are\r
1330 +other, non-email files (such as indexes maintained by other email\r
1331 +programs) then notmuch will do its best to detect those and ignore\r
1332 +them.\r
1333 +\r
1334 +Mail storage that uses mbox format, (where one mbox file contains many\r
1335 +messages), will not work with notmuch. If that's how your mail is\r
1336 +currently stored, it is recommended you first convert it to maildir\r
1337 +format with a utility such as mb2md before running \ **notmuch**\  \ **setup**\  \ **.**\\r
1338 +\r
1339 +Invoking \ **notmuch**\  with no command argument will run \ **setup**\  if the setup\r
1340 +command has not previously been completed.\r
1341 +\r
1342 +\ **OTHER**\  \ **COMMANDS**\\r
1343 +Several of the notmuch commands accept search terms with a common\r
1344 +syntax. See notmuch-search-terms(7) for more details on the supported\r
1345 +syntax.\r
1346 +\r
1347 +The \ **search**\ , \ **show**\  and \ **count**\  commands are used to query the email\r
1348 +database.\r
1349 +\r
1350 +The \ **reply**\  command is useful for preparing a template for an email\r
1351 +reply.\r
1352 +\r
1353 +The \ **tag**\  command is the only command available for manipulating database\r
1354 +contents.\r
1355 +\r
1356 +The \ **dump**\  and \ **restore**\  commands can be used to create a textual dump of\r
1357 +email tags for backup purposes, and to restore from that dump.\r
1358 +\r
1359 +The \ **config**\  command can be used to get or set settings int the notmuch\r
1360 +configuration file.\r
1361 +\r
1362 +\r
1363 +Environment\r
1364 +===========\r
1365 +\r
1366 +\r
1367 +The following environment variables can be used to control the behavior\r
1368 +of notmuch.\r
1369 +\r
1370 +\r
1371 +\ **NOTMUCH_CONFIG**\\r
1372 +\r
1373 + Specifies the location of the notmuch configuration file.\r
1374 + Notmuch will use ${HOME}/.notmuch-config if this variable is not\r
1375 + set.\r
1376 +\r
1377 +\r
1378 +\r
1379 +\ **NOTMUCH_TALLOC_REPORT**\\r
1380 +\r
1381 + Location to write a talloc memory usage report. See\r
1382 + \ **talloc_enable_leak_report_full**\  in talloc(3) for more\r
1383 + information.\r
1384 +\r
1385 +\r
1386 +\r
1387 +\ **NOTMUCH_DEBUG_QUERY**\\r
1388 +\r
1389 + If set to a non-empty value, the notmuch library will print (to\r
1390 + stderr) Xapian queries it constructs.\r
1391 +\r
1392 +\r
1393 +See Also\r
1394 +========\r
1395 +\r
1396 +\r
1397 +notmuch-config(1), notmuch-count(1), notmuch-dump(1), notmuch-hooks(5),\r
1398 +notmuch-insert(1), notmuch-new(1), notmuch-reply(1), notmuch-restore(1),\r
1399 +notmuch-search(1), notmuch-search-terms(7), notmuch-show(1),\r
1400 +notmuch-tag(1)\r
1401 +\r
1402 +The notmuch website: \ **http://notmuchmail.org**\\r
1403 +\r
1404 +\r
1405 +Contact\r
1406 +========\r
1407 +\r
1408 +\r
1409 +Feel free to send questions, comments, or kudos to the notmuch mailing\r
1410 +list <notmuch@notmuchmail.org> . Subscription is not required before\r
1411 +posting, but is available from the notmuchmail.org website.\r
1412 +\r
1413 +Real-time interaction with the Notmuch community is available via IRC\r
1414 +(server: irc.freenode.net, channel: #notmuch).\r
1415 -- \r
1416 1.8.5.2\r
1417 \r