summaryrefslogtreecommitdiff
path: root/docs/source/configuration/index.rst
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2012-02-24 10:36:15 +0000
committerPatrick Totzke <patricktotzke@gmail.com>2012-02-24 10:36:15 +0000
commitb508d2a531487fbffcd3eba43ce8e2c47666d60a (patch)
tree8c0f9d9f3fec56cc5af146dd22a5e45f31bd866c /docs/source/configuration/index.rst
parent108df3df8571aea2164a5d3fc42655ac2bd06c17 (diff)
docs: tagstrings via regular expressions
Diffstat (limited to 'docs/source/configuration/index.rst')
-rw-r--r--docs/source/configuration/index.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/docs/source/configuration/index.rst b/docs/source/configuration/index.rst
index 94b5e347..33cd81ec 100644
--- a/docs/source/configuration/index.rst
+++ b/docs/source/configuration/index.rst
@@ -235,7 +235,8 @@ The following attribute keys will interpreted and may contain urwid attribute st
as described in the :ref:`Themes` section above:
`fg` (foreground), `bg` (background), `focus_fg` (foreground if focussed) and `focus_bg` (background if focussed).
-An alternative string representation is read from the option `translated`.
+An alternative string representation is read from the option `translated` or can be given
+as pair of strings in `translation`.
The following will make alot display the "todo" tag as "TODO" in white on red. ::
@@ -263,3 +264,15 @@ like this::
[[encrypted]]
translated= ⚷
+
+You may use regular expressions in the tagstring subsections to theme multiple tagstrings at once.
+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 you can use the following::
+
+ [[notmuch::.*]]
+ fg = '#fff'
+ bg = '#88d'
+ translation = 'notmuch::(\*)','nm\1'
+
+.. _nmbug: http://notmuchmail.org/nmbug/