diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-25 19:41:57 +0000 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-02-25 19:41:57 +0000 |
commit | d73b6c4ff44c093498e0556da7a9f4097093917b (patch) | |
tree | b3810931e02cdfa35e723c3ec800520315031728 /docs/source/configuration/index.rst | |
parent | baded452887862f1ce250d3da7eb4fdde09ecee3 (diff) |
document abook configuration
Diffstat (limited to 'docs/source/configuration/index.rst')
-rw-r--r-- | docs/source/configuration/index.rst | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/docs/source/configuration/index.rst b/docs/source/configuration/index.rst index 5102b1ff..737b9a11 100644 --- a/docs/source/configuration/index.rst +++ b/docs/source/configuration/index.rst @@ -50,37 +50,39 @@ The following entries are interpreted at the moment: Contacts Completion =================== -In each :ref:`account` section you can specify a `abook_command` that -is considered the address book of that account and will be used -for address completion where appropriate. +For each :ref:`account <account>` you can define an addressbook by providing a subsection named `abook`. +Crucially, this section needs an option `type` that specifies the type of the addressbook. +Supported at the moment is only the type "shellcommand", which can be used in combination +with the options "command" and "regexp": -This shell command will be called with the search prefix as only argument. -Its output is searched for email-name pairs using the regular expression given as `abook_regexp`, +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/>`_:: [accounts] [[youraccount]] ... - abook_command = abook --mutt-query - abook_regexp = '^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)' + [[[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:: - abook_command = goobook query - abook_regexp = '^(?P<email>[^@]+@[^\t]+)\t+(?P<name>[^\t]+)' + 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:: - abook_command = nottoomuch-addresses.sh - abook_regexp = \"(?P<name>.+)\"\s*<(?P<email>.*.+?@.+?)> - -Don't hesitate to send me your custom `abook_regexp` values to list them here. + command = nottoomuch-addresses.sh + regexp = \"(?P<name>.+)\"\s*<(?P<email>.*.+?@.+?)> +Don't hesitate to send me your custom `regexp` values to list them here. Key Bindings |