Previous: , Up: Contexts   [Contents]

9.5 Some context tricks

It is possible to automatically fill mu4e-user-address-list by concatenating the user-mail-address fields of all contexts:

  ;; This sets `mu4e-user-mail-address-list' to the concatenation of all
  ;; `user-mail-address' values for all contexts. If you have other mail
  ;; addresses as well, you'll need to add those manually.
  (setq mu4e-user-mail-address-list
    (delq nil
      (mapcar (lambda (context)
                (when (mu4e-context-vars context)
                  (cdr (assq 'user-mail-address (mu4e-context-vars context)))))