Tip: BBDB mode for contact management
Table of Contents
BBDB1 is one of those libraries that has been around for so long it would be highly irregular if we weren’t talking about Emacs. The size and age of the thing is what originally scared me away from it in favor of org-contacts2, which had the advantage of being orgmode but was deprecated a long time ago. With BBDB you don’t usually view the elisp database that lies beneath, instead using its robust interface to interact. Yeah, this is a little old-fashioned since to those who like the transparency of working with the data directly, but it is a well-polished product with a great API that I probably have not really started to take full advantage.
If users have any extra tweaks they recommend for BBDB, I’d love to know them!
mail aliases
One of the first things I missed from Org-Contacts was the easy completion to send my message to a tagged group. Naturally for as matured a product as BBDB, this is actually not too hard: see the mail aliases
hooks in my code. After that, if I have set a mail alias for people in BBDB proper, simply entering that alias (e.g. “newsletter”) and pressing <SPC>
will replace the alias with all their addresses, properly spaced. It works in any of To, Cc, or Bcc header fields.
Requiring
(use-package bbdb
:custom
(bbdb-mua-auto-update-p 'query)
:config
(setq bbdb-file "~/emacs/bbdb")
(add-hook 'mail-setup-hook 'bbdb-mail-aliases)
(add-hook 'message-setup-hook 'bbdb-mail-aliases))
Footnotes
1 Described here: https://www.emacswiki.org/emacs/BbdbMode . Straight knows to get it from here, the official Emacs git location: https://git.savannah.nongnu.org/git/bbdb.git
2 A good mailing-list thread from 2011 asking about [O] org-contacts or bbdb? https://lists.gnu.org/archive/html/emacs-orgmode/2011-10/msg00763.html