A.2 BBDB

Note, mu4e supports built-in address autocompletion; Address autocompletion, and that is the recommended way to do this. However, it is also possible to manage your addresses with BBDB.

To enable BBDB, add to your ~/.emacs (or its moral equivalent, such as ~/.emacs.d/init.el) the following after the (require 'mu4e) line:

  ;; Load BBDB (Method 1)
  (require 'bbdb-loaddefs)
  ;; OR (Method 2)
  ;; (require 'bbdb-loaddefs "/path/to/bbdb/lisp/bbdb-loaddefs.el")
  ;; OR (Method 3)
  ;; (autoload 'bbdb-insinuate-mu4e "bbdb-mu4e")
  ;; (bbdb-initialize 'message 'mu4e)

  (setq bbdb-mail-user-agent 'mu4e-user-agent)
  (setq mu4e-view-rendered-hook 'bbdb-mua-auto-update)
  (setq mu4e-compose-complete-addresses nil)
  (setq bbdb-mua-pop-up t)
  (setq bbdb-mua-pop-up-window-size 5)
  (setq mu4e-view-show-addresses t)

For recent emacs (29 and later), address-completion may need some extra setup:

(add-hook 'message-mode-hook
          (lambda ()
            (add-to-list 'completion-at-point-functions
                         #'eudc-capf-complete)))

or, if that does not work:

(add-hook 'message-mode-hook
          (lambda ()
            (add-to-list 'completion-at-point-functions
                         #'message-expand-name)))

After this, you should be able to: