diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-08-01 08:48:43 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-08-01 08:48:43 +0100 |
commit | 0cc29f4b48dc8f128d0cdf9d3ff4e328a8dfc454 (patch) | |
tree | cc1dc63b81c0fb5b6c3f50c0dc85a97484fc66db /docs | |
parent | 4910c518007f10d31c7e9084541ffd74954e0f6a (diff) |
doc: highlight ini blocks
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/configuration/accounts.rst | 4 | ||||
-rw-r--r-- | docs/source/configuration/contacts_completion.rst | 33 | ||||
-rw-r--r-- | docs/source/configuration/theming.rst | 22 |
3 files changed, 40 insertions, 19 deletions
diff --git a/docs/source/configuration/accounts.rst b/docs/source/configuration/accounts.rst index 3e9bb946..ac64f40e 100644 --- a/docs/source/configuration/accounts.rst +++ b/docs/source/configuration/accounts.rst @@ -5,7 +5,9 @@ Accounts In order to be able to send mails, you have to define at least one account subsection in your config: There needs to be a section "accounts", and each subsection, indicated by double square brackets defines an account. -Here is an example configuration:: +Here is an example configuration + +.. code-block:: ini [accounts] [[work]] diff --git a/docs/source/configuration/contacts_completion.rst b/docs/source/configuration/contacts_completion.rst index 5d2a7615..b1c9f313 100644 --- a/docs/source/configuration/contacts_completion.rst +++ b/docs/source/configuration/contacts_completion.rst @@ -14,27 +14,34 @@ The only types supported at the moment are "shellcommand" and "abook": The value of `command` will be called with the search prefix as only argument for lookups. Its output is searched for email-name pairs using the regular expression given as `regexp`, which must include named groups "email" and "name" to match the email address and realname parts - respectively. See below for an example that uses `abook <http://abook.sourceforge.net/>`_:: + respectively. See below for an example that uses `abook <http://abook.sourceforge.net/>`_ + + .. sourcecode:: ini + + [accounts] + [[youraccount]] + # ... + [[[abook]]] + type = shellcommand + command = abook --mutt-query + regexp = '^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)' - [accounts] - [[youraccount]] - ... - [[[abook]]] - type = shellcommand - command = abook --mutt-query - regexp = '^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)' See `here <http://notmuchmail.org/emacstips/#index12h2>`_ for alternative lookup commands. The few others I have tested so far are: `goobook <http://code.google.com/p/goobook/>`_ - for cached google contacts lookups. Works with the above default regexp:: + for cached google contacts lookups. Works with the above default regexp + + .. code-block:: ini command = goobook query regexp = '^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)' `nottoomuch-addresses <http://www.iki.fi/too/nottoomuch/nottoomuch-addresses/>`_ - completes contacts found in the notmuch index:: + completes contacts found in the notmuch index: + + .. code-block:: ini command = nottoomuch-addresses.sh regexp = \"(?P<name>.+)\"\s*<(?P<email>.*.+?@.+?)> @@ -45,11 +52,13 @@ The only types supported at the moment are "shellcommand" and "abook": Address books of this type directly parse `abooks <http://abook.sourceforge.net/>`_ contact files. You may specify a path using the "abook_contacts_file" option, which - defaults to :file:`~/.abook/addressbook`. To use the default path, simply do this:: + defaults to :file:`~/.abook/addressbook`. To use the default path, simply do this: + + .. code-block:: ini [accounts] [[youraccount]] - ... + # ... [[[abook]]] type = abook diff --git a/docs/source/configuration/theming.rst b/docs/source/configuration/theming.rst index 6a1853c1..768fccea 100644 --- a/docs/source/configuration/theming.rst +++ b/docs/source/configuration/theming.rst @@ -42,7 +42,9 @@ for more details on the interpreted values. A colour picker that makes choosing found in :file:`alot/extra/colour_picker.py`. As an example, check the setting below that makes the footer line appear as -underlined bold red text on a bright green background:: +underlined bold red text on a bright green background: + +.. sourcecode:: ini [[global]] #name mono fg mono bg 16c fg 16c bg 256c fg 256c bg @@ -94,7 +96,9 @@ the criteria defined by its 'query' and 'taggeswith' values: The example below shows how to highlight unread threads: The date-part will be bold red if the thread has unread messages and flagged messages -and just bold if the thread has unread but no flagged messages:: +and just bold if the thread has unread but no flagged messages: + +.. sourcecode:: ini [search] # default threadline @@ -106,7 +110,7 @@ and just bold if the thread has unread but no flagged messages:: normal = 'default','default','light gray','default','g58','default' focus = 'standout','default','light gray','dark gray','g89','#68a' width = 'fit',10,10 - ... + # ... # highlight threads containing unread and flagged messages [[threadline-flagged-unread]] @@ -137,7 +141,9 @@ Such a section may define representation on the fly using `re.sub`. This only really makes sense if one uses a regular expression to match more than one tagstring (see below). -The following will make alot display the "todo" tag as "TODO" in white on red. :: +The following will make alot display the "todo" tag as "TODO" in white on red. + +.. sourcecode:: ini [tags] [[todo]] @@ -146,7 +152,9 @@ The following will make alot display the "todo" tag as "TODO" in white on red. : Utf-8 symbols are welcome here, see e.g. http://panmental.de/symbols/info.htm for some fancy symbols. I personally display my maildir flags -like this:: +like this: + +.. sourcecode:: ini [tags] @@ -168,7 +176,9 @@ You may use regular expressions in the tagstring subsections to theme multiple t If you do so, you can use the `translation` option to specify a string substitution that will rename a matching tagstring. `translation` takes a comma separated *pair* of strings that will be fed to :func:`re.sub`. For instance, to theme all your `nmbug`_ tagstrings and especially colour tag `notmuch::bug` red, -do the following:: +do the following: + +.. sourcecode:: ini [[notmuch::bug]] translated = 'nm:bug' |