diff options
| author | joost <joost@w520jo.(none)> | 2014-03-28 10:24:43 +0100 |
|---|---|---|
| committer | joost <joost@w520jo.(none)> | 2014-03-28 10:24:43 +0100 |
| commit | d2915b7bb97ecf7f79f4b5f738dffe1dcf40a994 (patch) | |
| tree | a14300fafb60fa28ae840cf4a12e8b16974f5ccc /mu4e | |
| parent | 86f0934f7b8c583553c6643c5cb3aef16ebf4aff (diff) | |
fixes #383
Diffstat (limited to 'mu4e')
| -rw-r--r-- | mu4e/mu4e-utils.el | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/mu4e/mu4e-utils.el b/mu4e/mu4e-utils.el index 5ed05b7..d8d55b1 100644 --- a/mu4e/mu4e-utils.el +++ b/mu4e/mu4e-utils.el @@ -604,6 +604,20 @@ process." (replace-regexp-in-string "\"" "\\\\\"" ph))) (t (format "\"%s\"" ph))))) +;;; names and mail-addresses can be mapped onto their canonical counterpart. +;;; use the customizeable function mu4e-canonical-contact-function to do that. +;;; below the identity function for mapping a contact onto the canonical one. +(defun mu4e-canonical-contact-identity (contact) + "This returns the name and the mail-address of a contact. +It's used as an identity function for converting contacts to their +canonical counterpart." + (let ((name (plist-get contact :name)) + (mail (plist-get contact :mail)) + ) + (list :name name :mail mail) + ) + ) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; start and stopping (defun mu4e~fill-contacts (contacts) @@ -628,8 +642,9 @@ This is used by the completion function in mu4e-compose." (< tstamp1 tstamp2) (< freq1 freq2))))))) (dolist (contact contacts) - (let ((name (plist-get contact :name)) - (mail (plist-get contact :mail))) + (let* ((canonicalcontact (funcall mu4e-canonical-contact-function contact)) + (name (plist-get canonicalcontact :name)) + (mail (plist-get canonicalcontact :mail))) (when mail (unless ;; ignore some address ('noreply' etc.) (and mu4e-compose-complete-ignore-address-regexp |
