summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Makefile (renamed from docs/user/Makefile)0
-rw-r--r--docs/dev/Makefile130
-rw-r--r--docs/dev/source/index.rst58
-rw-r--r--docs/man/alot.162
-rw-r--r--docs/man/manpage.in28
-rw-r--r--docs/source/_templates/layout.html (renamed from docs/user/source/_templates/layout.html)0
-rw-r--r--docs/source/api/accounts.rst (renamed from docs/dev/source/accounts.rst)0
-rw-r--r--docs/source/api/commands.rst (renamed from docs/dev/source/commands.rst)0
-rw-r--r--docs/source/api/conf.py (renamed from docs/dev/source/conf.py)0
-rw-r--r--docs/source/api/contributing.rst23
-rw-r--r--docs/source/api/database.rst (renamed from docs/dev/source/database.rst)0
-rw-r--r--docs/source/api/index.rst15
-rw-r--r--docs/source/api/interface.rst (renamed from docs/dev/source/interface.rst)0
-rw-r--r--docs/source/api/overview.rst19
-rw-r--r--docs/source/api/settings.rst (renamed from docs/dev/source/settings.rst)0
-rw-r--r--docs/source/api/utils.rst (renamed from docs/dev/source/utils.rst)0
-rw-r--r--docs/source/conf.py (renamed from docs/user/source/conf.py)36
-rw-r--r--docs/source/configuration.rst (renamed from docs/user/source/configuration.rst)0
-rw-r--r--docs/source/description.rst (renamed from docs/user/source/description.rst)0
-rwxr-xr-xdocs/source/generate_commands.py (renamed from docs/user/source/generate_commands.py)0
-rw-r--r--docs/source/index.rst (renamed from docs/user/source/index.rst)1
-rw-r--r--docs/source/manpage.rst (renamed from docs/user/source/manpage.rst)0
-rw-r--r--docs/source/usage/commands.rst17
-rw-r--r--docs/source/usage/first_steps.rst (renamed from docs/user/source/usage/first_steps.rst)0
-rw-r--r--docs/source/usage/index.rst (renamed from docs/user/source/usage/index.rst)0
-rw-r--r--docs/source/usage/modes/bufferlist.rst20
-rw-r--r--docs/source/usage/modes/envelope.rst87
-rw-r--r--docs/source/usage/modes/global.rst174
-rw-r--r--docs/source/usage/modes/search.rst108
-rw-r--r--docs/source/usage/modes/taglist.rst12
-rw-r--r--docs/source/usage/modes/thread.rst193
-rw-r--r--docs/source/usage/synopsis.rst (renamed from docs/user/source/usage/synopsis.rst)0
32 files changed, 703 insertions, 280 deletions
diff --git a/docs/user/Makefile b/docs/Makefile
index 29be0741..29be0741 100644
--- a/docs/user/Makefile
+++ b/docs/Makefile
diff --git a/docs/dev/Makefile b/docs/dev/Makefile
deleted file mode 100644
index b4d9a3dd..00000000
--- a/docs/dev/Makefile
+++ /dev/null
@@ -1,130 +0,0 @@
-# Makefile for Sphinx documentation
-#
-
-# You can set these variables from the command line.
-SPHINXOPTS =
-SPHINXBUILD = sphinx-build
-PAPER =
-BUILDDIR = build
-
-# Internal variables.
-PAPEROPT_a4 = -D latex_paper_size=a4
-PAPEROPT_letter = -D latex_paper_size=letter
-ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
-
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest
-
-help:
- @echo "Please use \`make <target>' where <target> is one of"
- @echo " html to make standalone HTML files"
- @echo " dirhtml to make HTML files named index.html in directories"
- @echo " singlehtml to make a single large HTML file"
- @echo " pickle to make pickle files"
- @echo " json to make JSON files"
- @echo " htmlhelp to make HTML files and a HTML help project"
- @echo " qthelp to make HTML files and a qthelp project"
- @echo " devhelp to make HTML files and a Devhelp project"
- @echo " epub to make an epub"
- @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
- @echo " latexpdf to make LaTeX files and run them through pdflatex"
- @echo " text to make text files"
- @echo " man to make manual pages"
- @echo " changes to make an overview of all changed/added/deprecated items"
- @echo " linkcheck to check all external links for integrity"
- @echo " doctest to run all doctests embedded in the documentation (if enabled)"
-
-clean:
- -rm -rf $(BUILDDIR)/*
-
-html:
- $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
-
-dirhtml:
- $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
- @echo
- @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
-
-singlehtml:
- $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
- @echo
- @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
-
-pickle:
- $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
- @echo
- @echo "Build finished; now you can process the pickle files."
-
-json:
- $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
- @echo
- @echo "Build finished; now you can process the JSON files."
-
-htmlhelp:
- $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
- @echo
- @echo "Build finished; now you can run HTML Help Workshop with the" \
- ".hhp project file in $(BUILDDIR)/htmlhelp."
-
-qthelp:
- $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
- @echo
- @echo "Build finished; now you can run "qcollectiongenerator" with the" \
- ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
- @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/alot.qhcp"
- @echo "To view the help file:"
- @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/alot.qhc"
-
-devhelp:
- $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
- @echo
- @echo "Build finished."
- @echo "To view the help file:"
- @echo "# mkdir -p $$HOME/.local/share/devhelp/alot"
- @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/alot"
- @echo "# devhelp"
-
-epub:
- $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
- @echo
- @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-
-latex:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo
- @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
- @echo "Run \`make' in that directory to run these through (pdf)latex" \
- "(use \`make latexpdf' here to do that automatically)."
-
-latexpdf:
- $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
- @echo "Running LaTeX files through pdflatex..."
- make -C $(BUILDDIR)/latex all-pdf
- @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-
-text:
- $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
- @echo
- @echo "Build finished. The text files are in $(BUILDDIR)/text."
-
-man:
- $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
- @echo
- @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
-
-changes:
- $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
- @echo
- @echo "The overview file is in $(BUILDDIR)/changes."
-
-linkcheck:
- $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
- @echo
- @echo "Link check complete; look for any errors in the above output " \
- "or in $(BUILDDIR)/linkcheck/output.txt."
-
-doctest:
- $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
- @echo "Testing of doctests in the sources finished, look at the " \
- "results in $(BUILDDIR)/doctest/output.txt."
diff --git a/docs/dev/source/index.rst b/docs/dev/source/index.rst
deleted file mode 100644
index a112a340..00000000
--- a/docs/dev/source/index.rst
+++ /dev/null
@@ -1,58 +0,0 @@
-`alot` Developer Manual
-***********************
-
-.. module:: alot
-
-Birds eye on alot internals
-===========================
-The main component is :class:`alot.ui.UI`, which provides methods for user input and notifications,
-sets up an :mod:`urwid` :class:`mainloop <urwid.main_loop.TwistedEventLoop>` and widget tree and
-maintains the list of active buffers. Moreover, it integrates different "managers" responsible for
-core functionalities:
-
-* a :class:`~db.DBManager` to access the email database
-* an :class:`~account.AccountManager` to deal with user accounts
-* a :class:`~settings.AlotConfigParser` (subclasses :class:`configparser.ConfigParser`) for user settings
-
-Every user action, triggered either by keybindings or as input to the commandprompt, is
-given as commandline string that gets :func:`translated <commands.commandfactory>`
-to a :class:`~commands.Command` which is then :meth:`applied <ui.UI.apply_command>`.
-Different actions are defined as a subclasses of :class:`~commands.Command`, which live
-in `alot/commands/MODE.py`, where MODE is the name of the mode (:class:`Buffer` type) they
-are used in.
-
-Contributing
-============
-
-Development is coordinated entirely via the projects `github page <https://github.com/pazz/alot>`_
-especially the `issue tracker <https://github.com/pazz/alot/issues>`_.
-Current HEAD can be found in branch `testing` from `git@github.com:pazz/alot.git`.
-
-You can send patches to notmuch's mailing list but pull requests on github are preferred.
-Here are a few more things you should know and check before you send pull requests:
-
-* Follow :pep:`8`. This means in particular a maximum linewidth of *79* and no trailing
- white spaces. If in doubt, use an `automatic tool <http://pypi.python.org/pypi/pep8>`_
- to verify your code.
-
-* Document! Needless to say, we want readable and well documented code. Moreover,
-
- * use `sphinx directives <http://sphinx.pocoo.org/rest.html>`_ to document
- the parameters and return values of your methods so that we maintain up-to-date API docs.
- * Make sure your patch doesn't break the API docs. The build service at `readthedocs.org <http:alot.rtfd.org>`_
- is fragile when it comes to new import statements in our code.
- * If you implemented a new feature, update the user manual in :file:`/docs/user` accordingly.
-
-
-Contents
-========
-
-.. toctree::
- :maxdepth: 1
-
- database
- interface
- settings
- accounts
- utils
- commands
diff --git a/docs/man/alot.1 b/docs/man/alot.1
deleted file mode 100644
index e1e4996e..00000000
--- a/docs/man/alot.1
+++ /dev/null
@@ -1,62 +0,0 @@
-.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.38.4.
-.TH ALOT "1" "December 2011" "alot 0.21" "User Commands"
-.SH NAME
-mail user agent for the notmuch mail system
-.SH SYNOPSIS
-alot [-r] [-c CONFIGFILE] [-n NOTMUCHCONFIGFILE] [-C {1,16,256}]
- [-p DB_PATH] [-d {debug,info,warning,error}] [-l LOGFILE]
- [--version] [--help] [command]
-.SH DESCRIPTION
-A terminal-based interface for the notmuch mail system.
-It features a modular and command prompt driven interface to provide a full MUA
-experience as an alternative to the Emacs mode shipped with notmuch.
-
-In all views, arrows, page-up/down, `j`,`k` and `Space` can be used to move the
-focus. `Escape` cancels prompts and `Enter` selects. Hit `:` at any time and type
-in commands to the prompt. Usage information on any command can be listed by typing
-`help YOURCOMMAND` to the prompt; The keybindings for the current mode are listet
-upon pressing `?`.
-.SH OPTIONS
-.TP
-\fB\-r\fR, \fB\-\-read\-only\fR
-open db in read only mode
-.TP
-\fB\-c\fR, \fB\-\-config=\fR
-config file [default: ~/.config/alot/config]
-.TP
-\fB\-n\fR, \fB\-\-notmuch\-config=\fR
-notmuch config [default: ~/.notmuch\-config]
-.TP
-\fB\-C\fR, \fB\-\-colour\-mode=\fR
-terminal colour mode [default: 256]. Must be 1, 16 or
-256
-.TP
-\fB\-p\fR, \fB\-\-mailindex\-path=\fR
-path to notmuch index
-.TP
-\fB\-d\fR, \fB\-\-debug\-level=\fR
-debug log [default: info]. Must be one of
-debug,info,warning or error
-.TP
-\fB\-l\fR, \fB\-\-logfile=\fR
-logfile [default: /dev/null]
-.HP
-\fB\-\-version\fR
-.TP
-\fB\-\-help\fR
-Display this help and exit.
-.SS "Commands:"
-.TP
-search
-start in a search buffer using the querystring provided as
-parameter. See the SEARCH SYNTAX section of notmuch(1).
-.TP
-compose
-compose a new message
-.SH BUGS
-Alot is a fairly new project, so expect misbehaviour. Bugs can be reported via the
-issue tracker on the projecs github page (https://github.com/pazz/alot).
-.SH AUTHOR
-Patrick Totzke <patricktotzke at googlemail dot com>
-.SH "SEE ALSO"
-notmuch(1)
diff --git a/docs/man/manpage.in b/docs/man/manpage.in
deleted file mode 100644
index 4c9b1fdd..00000000
--- a/docs/man/manpage.in
+++ /dev/null
@@ -1,28 +0,0 @@
-[NAME]
-mail user agent for the notmuch mail system
-
-[SYNOPSIS]
-alot [-r] [-c CONFIGFILE] [-n NOTMUCHCONFIGFILE] [-C {1,16,256}]
- [-p DB_PATH] [-d {debug,info,warning,error}] [-l LOGFILE]
- [--version] [--help] [command]
-
-[DESCRIPTION]
-A terminal-based interface for the notmuch mail system.
-It features a modular and command prompt driven interface to provide a full MUA
-experience as an alternative to the Emacs mode shipped with notmuch.
-
-In all views, arrows, page-up/down, `j`,`k` and `Space` can be used to move the
-focus. `Escape` cancels prompts and `Enter` selects. Hit `:` at any time and type
-in commands to the prompt. Usage information on any command can be listed by typing
-`help YOURCOMMAND` to the prompt; The keybindings for the current mode are listet
-upon pressing `?`.
-
-[BUGS]
-Alot is a fairly new project, so expect misbehaviour. Bugs can be reported via the
-issue tracker on the projecs github page (https://github.com/pazz/alot).
-
-[AUTHOR]
-Patrick Totzke <patricktotzke at googlemail dot com>
-
-[SEE ALSO]
-notmuch(1)
diff --git a/docs/user/source/_templates/layout.html b/docs/source/_templates/layout.html
index b4384e43..b4384e43 100644
--- a/docs/user/source/_templates/layout.html
+++ b/docs/source/_templates/layout.html
diff --git a/docs/dev/source/accounts.rst b/docs/source/api/accounts.rst
index c09b43fa..c09b43fa 100644
--- a/docs/dev/source/accounts.rst
+++ b/docs/source/api/accounts.rst
diff --git a/docs/dev/source/commands.rst b/docs/source/api/commands.rst
index f38ac04c..f38ac04c 100644
--- a/docs/dev/source/commands.rst
+++ b/docs/source/api/commands.rst
diff --git a/docs/dev/source/conf.py b/docs/source/api/conf.py
index 0c36a73f..0c36a73f 100644
--- a/docs/dev/source/conf.py
+++ b/docs/source/api/conf.py
diff --git a/docs/source/api/contributing.rst b/docs/source/api/contributing.rst
new file mode 100644
index 00000000..c5770aca
--- /dev/null
+++ b/docs/source/api/contributing.rst
@@ -0,0 +1,23 @@
+Contributing
+============
+
+Development is coordinated entirely via the projects `github page <https://github.com/pazz/alot>`_
+especially the `issue tracker <https://github.com/pazz/alot/issues>`_.
+Current HEAD can be found in branch `testing` from `git@github.com:pazz/alot.git`.
+
+You can send patches to notmuch's mailing list but pull requests on github are preferred.
+Here are a few more things you should know and check before you send pull requests:
+
+* Follow :pep:`8`. This means in particular a maximum linewidth of *79* and no trailing
+ white spaces. If in doubt, use an `automatic tool <http://pypi.python.org/pypi/pep8>`_
+ to verify your code.
+
+* Document! Needless to say, we want readable and well documented code. Moreover,
+
+ * use `sphinx directives <http://sphinx.pocoo.org/rest.html>`_ to document
+ the parameters and return values of your methods so that we maintain up-to-date API docs.
+ * Make sure your patch doesn't break the API docs. The build service at `readthedocs.org <http:alot.rtfd.org>`_
+ is fragile when it comes to new import statements in our code.
+ * If you implemented a new feature, update the user manual in :file:`/docs/user` accordingly.
+
+
diff --git a/docs/dev/source/database.rst b/docs/source/api/database.rst
index 00334a4b..00334a4b 100644
--- a/docs/dev/source/database.rst
+++ b/docs/source/api/database.rst
diff --git a/docs/source/api/index.rst b/docs/source/api/index.rst
new file mode 100644
index 00000000..35b4fd7c
--- /dev/null
+++ b/docs/source/api/index.rst
@@ -0,0 +1,15 @@
+API and Development
+*******************
+
+.. module:: alot
+.. toctree::
+ :maxdepth: 1
+
+ overview
+ contributing
+ database
+ interface
+ settings
+ accounts
+ utils
+ commands
diff --git a/docs/dev/source/interface.rst b/docs/source/api/interface.rst
index 0df9d7ca..0df9d7ca 100644
--- a/docs/dev/source/interface.rst
+++ b/docs/source/api/interface.rst
diff --git a/docs/source/api/overview.rst b/docs/source/api/overview.rst
new file mode 100644
index 00000000..051eacaa
--- /dev/null
+++ b/docs/source/api/overview.rst
@@ -0,0 +1,19 @@
+Overview
+========
+
+The main component is :class:`alot.ui.UI`, which provides methods for user input and notifications,
+sets up an :mod:`urwid` :class:`mainloop <urwid.main_loop.TwistedEventLoop>` and widget tree and
+maintains the list of active buffers. Moreover, it integrates different "managers" responsible for
+core functionalities:
+
+* a :class:`~db.DBManager` to access the email database
+* an :class:`~account.AccountManager` to deal with user accounts
+* a :class:`~settings.AlotConfigParser` (subclasses :class:`configparser.ConfigParser`) for user settings
+
+Every user action, triggered either by keybindings or as input to the commandprompt, is
+given as commandline string that gets :func:`translated <commands.commandfactory>`
+to a :class:`~commands.Command` which is then :meth:`applied <ui.UI.apply_command>`.
+Different actions are defined as a subclasses of :class:`~commands.Command`, which live
+in `alot/commands/MODE.py`, where MODE is the name of the mode (:class:`Buffer` type) they
+are used in.
+
diff --git a/docs/dev/source/settings.rst b/docs/source/api/settings.rst
index f7272756..f7272756 100644
--- a/docs/dev/source/settings.rst
+++ b/docs/source/api/settings.rst
diff --git a/docs/dev/source/utils.rst b/docs/source/api/utils.rst
index 8cfae2b7..8cfae2b7 100644
--- a/docs/dev/source/utils.rst
+++ b/docs/source/api/utils.rst
diff --git a/docs/user/source/conf.py b/docs/source/conf.py
index 134c5aca..7a74dd46 100644
--- a/docs/user/source/conf.py
+++ b/docs/source/conf.py
@@ -13,10 +13,42 @@
import sys, os
+###############################
+# readthedocs.org hack,
+# needed to use autodocs on their build-servers:
+# http://readthedocs.org/docs/read-the-docs/en/latest/faq.html?highlight=autodocs#where-do-i-need-to-put-my-docs-for-rtd-to-find-it
+
+class Mock(object):
+ def __init__(self, *args, **kwargs):
+ pass
+
+ def __call__(self, *args, **kwargs):
+ return Mock()
+
+ @classmethod
+ def __getattr__(self, name):
+ return Mock() if name not in ('__file__', '__path__') else '/dev/null'
+
+MOCK_MODULES = ['notmuch', 'notmuch.globals',
+ 'twisted', 'twisted.internet',
+ 'twisted.internet.defer',
+ 'twisted.python',
+ 'twisted.python.failure',
+ 'twisted.internet.protocol',
+ 'urwid',
+ 'magic',
+ 'argparse']
+for mod_name in MOCK_MODULES:
+ sys.modules[mod_name] = Mock()
+
+# end of readthedocs.org hack
+##############################
+
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+sys.path.insert(0, os.path.abspath('..'))
+from alot import __version__,__author__
# -- General configuration -----------------------------------------------------
@@ -25,7 +57,7 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.intersphinx']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
diff --git a/docs/user/source/configuration.rst b/docs/source/configuration.rst
index 1c1d3eec..1c1d3eec 100644
--- a/docs/user/source/configuration.rst
+++ b/docs/source/configuration.rst
diff --git a/docs/user/source/description.rst b/docs/source/description.rst
index 9dea9693..9dea9693 100644
--- a/docs/user/source/description.rst
+++ b/docs/source/description.rst
diff --git a/docs/user/source/generate_commands.py b/docs/source/generate_commands.py
index 9179b952..9179b952 100755
--- a/docs/user/source/generate_commands.py
+++ b/docs/source/generate_commands.py
diff --git a/docs/user/source/index.rst b/docs/source/index.rst
index 755a4e33..03dacb4b 100644
--- a/docs/user/source/index.rst
+++ b/docs/source/index.rst
@@ -13,3 +13,4 @@ User Manual
usage/index
configuration
+ api/index
diff --git a/docs/user/source/manpage.rst b/docs/source/manpage.rst
index ae62bce7..ae62bce7 100644
--- a/docs/user/source/manpage.rst
+++ b/docs/source/manpage.rst
diff --git a/docs/source/usage/commands.rst b/docs/source/usage/commands.rst
new file mode 100644
index 00000000..8608bc50
--- /dev/null
+++ b/docs/source/usage/commands.rst
@@ -0,0 +1,17 @@
+Commands
+========
+
+
+
+:doc:`modes/global`
+ globally available commands
+:doc:`modes/search`
+ shows a result list of threads for a query
+:doc:`modes/thread`
+ displays a thread as a tree of messages
+:doc:`modes/envelope`
+ message composition mode
+:doc:`modes/bufferlist`
+ lists all active buffers
+:doc:`modes/taglist`
+ lists all tagstrings present in the notmuch database
diff --git a/docs/user/source/usage/first_steps.rst b/docs/source/usage/first_steps.rst
index 3ffa09ac..3ffa09ac 100644
--- a/docs/user/source/usage/first_steps.rst
+++ b/docs/source/usage/first_steps.rst
diff --git a/docs/user/source/usage/index.rst b/docs/source/usage/index.rst
index 7e97e78e..7e97e78e 100644
--- a/docs/user/source/usage/index.rst
+++ b/docs/source/usage/index.rst
diff --git a/docs/source/usage/modes/bufferlist.rst b/docs/source/usage/modes/bufferlist.rst
new file mode 100644
index 00000000..b619edf5
--- /dev/null
+++ b/docs/source/usage/modes/bufferlist.rst
@@ -0,0 +1,20 @@
+bufferlist
+----------
+The following commands are available in bufferlist mode
+
+.. index:: close
+
+close
+_____
+
+close focussed buffer
+
+
+.. index:: select
+
+select
+______
+
+focus selected buffer
+
+
diff --git a/docs/source/usage/modes/envelope.rst b/docs/source/usage/modes/envelope.rst
new file mode 100644
index 00000000..5e7cc1f3
--- /dev/null
+++ b/docs/source/usage/modes/envelope.rst
@@ -0,0 +1,87 @@
+envelope
+--------
+The following commands are available in envelope mode
+
+.. index:: set
+
+set
+___
+
+set header value
+
+positional arguments
+ :0: header to refine
+ :1: value
+
+
+optional arguments
+ :---append: keep previous values.
+
+.. index:: toggleheaders
+
+toggleheaders
+_____________
+
+toggle display of all headers
+
+
+.. index:: edit
+
+edit
+____
+
+edit mail
+
+optional arguments
+ :---spawn: force spawning of editor in a new terminal.
+ :---no-refocus: don't refocus envelope after editing (Defaults to: 'True').
+
+.. index:: send
+
+send
+____
+
+send mail
+
+
+.. index:: attach
+
+attach
+______
+
+attach files to the mail
+
+argument
+ file(s) to attach (accepts wildcads)
+
+
+.. index:: refine
+
+refine
+______
+
+prompt to change the value of a header
+
+argument
+ header to refine
+
+
+.. index:: save
+
+save
+____
+
+save draft
+
+
+.. index:: unset
+
+unset
+_____
+
+remove header field
+
+argument
+ header to refine
+
+
diff --git a/docs/source/usage/modes/global.rst b/docs/source/usage/modes/global.rst
new file mode 100644
index 00000000..845db65f
--- /dev/null
+++ b/docs/source/usage/modes/global.rst
@@ -0,0 +1,174 @@
+global
+------
+The following commands are available globally
+
+.. index:: bclose
+
+bclose
+______
+
+close a buffer
+
+
+.. index:: bprevious
+
+bprevious
+_________
+
+focus previous buffer
+
+
+.. index:: search
+
+search
+______
+
+open a new search buffer
+
+argument
+ search string
+
+optional arguments
+ :---sort: sort order. Valid choices are: \`oldest_first\`,\`newest_first\`,\`message_id\`,\`unsorted\`.
+
+.. index:: compose
+
+compose
+_______
+
+compose a new email
+
+optional arguments
+ :---sender: sender.
+ :---template: path to a template message file.
+ :---subject: subject line.
+ :---to: recipients.
+ :---cc: copy to.
+ :---bcc: blind copy to.
+ :---attach: attach files.
+ :---omit_signature: do not add signature.
+ :---spawn: spawn editor in new terminal.
+
+.. index:: prompt
+
+prompt
+______
+
+prompts for commandline and interprets it upon select
+
+argument
+ initial content
+
+
+.. index:: help
+
+help
+____
+
+
+ display help for a command. Use 'bindings' to
+ display all keybings interpreted in current mode.'
+
+
+argument
+ command or 'bindings'
+
+
+.. index:: move
+
+move
+____
+
+move focus
+
+argument
+ direction
+
+
+.. index:: shellescape
+
+shellescape
+___________
+
+run external command
+
+argument
+ command line to execute
+
+optional arguments
+ :---spawn: run in terminal window.
+ :---thread: run in separate thread.
+ :---refocus: refocus current buffer after command has finished.
+
+.. index:: refresh
+
+refresh
+_______
+
+refresh the current buffer
+
+
+.. index:: cancel
+
+cancel
+______
+
+send cancel event
+
+
+.. index:: pyshell
+
+pyshell
+_______
+
+open an interactive python shell for introspection
+
+
+.. index:: exit
+
+exit
+____
+
+shut down cleanly
+
+
+.. index:: flush
+
+flush
+_____
+
+flush write operations or retry until committed
+
+
+.. index:: bufferlist
+
+bufferlist
+__________
+
+open a list of active buffers
+
+
+.. index:: bnext
+
+bnext
+_____
+
+focus next buffer
+
+
+.. index:: select
+
+select
+______
+
+send select event
+
+
+.. index:: taglist
+
+taglist
+_______
+
+opens taglist buffer
+
+
diff --git a/docs/source/usage/modes/search.rst b/docs/source/usage/modes/search.rst
new file mode 100644
index 00000000..6a8632d5
--- /dev/null
+++ b/docs/source/usage/modes/search.rst
@@ -0,0 +1,108 @@
+search
+------
+The following commands are available in search mode
+
+.. index:: sort
+
+sort
+____
+
+set sort order
+
+argument
+ sort order. valid choices are: \`oldest_first\`,\`newest_first\`,\`message_id\`,\`unsorted\`.
+
+
+.. index:: untag
+
+untag
+_____
+
+remove tags from all messages in the thread
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: retag
+
+retag
+_____
+
+set tags of all messages in the thread
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: refineprompt
+
+refineprompt
+____________
+
+prompt to change this buffers querystring
+
+
+.. index:: tag
+
+tag
+___
+
+add tags to all messages in the thread
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: refine
+
+refine
+______
+
+refine query
+
+argument
+ search string
+
+optional arguments
+ :---sort: sort order. Valid choices are: \`oldest_first\`,\`newest_first\`,\`message_id\`,\`unsorted\`.
+
+.. index:: retagprompt
+
+retagprompt
+___________
+
+prompt to retag selected threads' tags
+
+
+.. index:: toggletags
+
+toggletags
+__________
+
+flip presence of tags on this thread.
+ A tag is considered present if at least one message contained in this
+ thread is tagged with it. In that case this command will remove the tag
+ from every message in the thread.
+
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: select
+
+select
+______
+
+open thread in a new buffer
+
+
diff --git a/docs/source/usage/modes/taglist.rst b/docs/source/usage/modes/taglist.rst
new file mode 100644
index 00000000..4272ccfa
--- /dev/null
+++ b/docs/source/usage/modes/taglist.rst
@@ -0,0 +1,12 @@
+taglist
+-------
+The following commands are available in taglist mode
+
+.. index:: select
+
+select
+______
+
+search for messages with selected tag
+
+
diff --git a/docs/source/usage/modes/thread.rst b/docs/source/usage/modes/thread.rst
new file mode 100644
index 00000000..41d58b52
--- /dev/null
+++ b/docs/source/usage/modes/thread.rst
@@ -0,0 +1,193 @@
+thread
+------
+The following commands are available in thread mode
+
+.. index:: pipeto
+
+pipeto
+______
+
+pipe message(s) to stdin of a shellcommand
+
+argument
+ shellcommand to pipe to
+
+optional arguments
+ :---all: pass all messages.
+ :---format: output format. Valid choices are: \`raw\`,\`decoded\`,\`id\`,\`filepath\` (Defaults to: 'raw').
+ :---separately: call command once for each message.
+ :---background: don't stop the interface.
+ :---add_tags: add 'Tags' header to the message.
+ :---shell: let the shell interpret the command.
+ :---notify_stdout: display command's stdout as notification message.
+
+.. index:: editnew
+
+editnew
+_______
+
+edit message in as new
+
+
+.. index:: toggleheaders
+
+toggleheaders
+_____________
+
+display all headers
+
+optional arguments
+ :---all: affect all messages.
+
+.. index:: print
+
+print
+_____
+
+print message(s)
+
+optional arguments
+ :---all: print all messages.
+ :---raw: pass raw mail string.
+ :---separately: call print command once for each message.
+ :---add_tags: add 'Tags' header to the message.
+
+.. index:: remove
+
+remove
+______
+
+remove message(s) from the index
+
+optional arguments
+ :---all: remove whole thread.
+
+.. index:: togglesource
+
+togglesource
+____________
+
+display message source
+
+optional arguments
+ :---all: affect all messages.
+
+.. index:: retag
+
+retag
+_____
+
+set message(s) tags.
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---all: tag all messages in thread.
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: fold
+
+fold
+____
+
+fold message(s)
+
+optional arguments
+ :---all: fold all messages.
+
+.. index:: tag
+
+tag
+___
+
+add tags to message(s)
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---all: tag all messages in thread.
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: untag
+
+untag
+_____
+
+remove tags from message(s)
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---all: tag all messages in thread.
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: unfold
+
+unfold
+______
+
+unfold message(s)
+
+optional arguments
+ :---all: unfold all messages.
+
+.. index:: forward
+
+forward
+_______
+
+forward message
+
+optional arguments
+ :---attach: attach original mail.
+
+.. index:: reply
+
+reply
+_____
+
+reply to message
+
+optional arguments
+ :---all: reply to all.
+
+.. index:: save
+
+save
+____
+
+save attachment(s)
+
+argument
+ path to save to
+
+optional arguments
+ :---all: save all attachments.
+
+.. index:: toggletags
+
+toggletags
+__________
+
+flip presence of tags on message(s)
+
+argument
+ comma separated list of tags
+
+optional arguments
+ :---all: tag all messages in thread.
+ :---no-flush: postpone a writeout to the index (Defaults to: 'True').
+
+.. index:: select
+
+select
+______
+
+select focussed element. The fired action depends on the focus:
+ - if message summary, this toggles visibility of the message,
+ - if attachment line, this opens the attachment
+
+
diff --git a/docs/user/source/usage/synopsis.rst b/docs/source/usage/synopsis.rst
index c18bfa03..c18bfa03 100644
--- a/docs/user/source/usage/synopsis.rst
+++ b/docs/source/usage/synopsis.rst