diff options
author | Patrick Totzke <patricktotzke@gmail.com> | 2012-08-01 08:35:21 +0100 |
---|---|---|
committer | Patrick Totzke <patricktotzke@gmail.com> | 2012-08-01 08:35:21 +0100 |
commit | 4910c518007f10d31c7e9084541ffd74954e0f6a (patch) | |
tree | ef5529102cff19ccc3ab1bd43ab823170c5609b7 /docs/source/configuration/contacts_completion.rst | |
parent | caa945578f889271d4505baa46b669aa64929e3f (diff) |
doc: include missing rst files
Diffstat (limited to 'docs/source/configuration/contacts_completion.rst')
-rw-r--r-- | docs/source/configuration/contacts_completion.rst | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/docs/source/configuration/contacts_completion.rst b/docs/source/configuration/contacts_completion.rst new file mode 100644 index 00000000..5d2a7615 --- /dev/null +++ b/docs/source/configuration/contacts_completion.rst @@ -0,0 +1,55 @@ +.. _config.contacts_completion: + +Contacts Completion +=================== +For each :ref:`account <config.accounts>` you can define an address book by providing a subsection named `abook`. +Crucially, this section needs an option `type` that specifies the type of the address book. +The only types supported at the moment are "shellcommand" and "abook": + +.. describe:: shellcommand + + Address books of this type use a shell command in combination with a regular + expression to look up contacts. + + 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]]] + 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:: + + 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:: + + command = nottoomuch-addresses.sh + regexp = \"(?P<name>.+)\"\s*<(?P<email>.*.+?@.+?)> + + Don't hesitate to send me your custom `regexp` values to list them here. + +.. describe:: 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:: + + [accounts] + [[youraccount]] + ... + [[[abook]]] + type = abook + |