From 521b8b5d550eaae7ffb4eda34d94609c0bbb8e8f Mon Sep 17 00:00:00 2001 From: Cayetano Santos Date: Tue, 3 Feb 2015 10:28:10 +0100 Subject: [PATCH] remove angles from email address if From: field --- mu4e-multi.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/mu4e-multi.el b/mu4e-multi.el index 2a69e49..2cd1dbe 100644 --- a/mu4e-multi.el +++ b/mu4e-multi.el @@ -201,9 +201,10 @@ keys of the `mu4e-multi-account-alist'." "-a" (catch 'exit (let* ((from (message-fetch-field "from")) - (email (and from - (string-match thing-at-point-email-regexp from) - (match-string-no-properties 0 from)))) + (emaildirty (and from + (string-match thing-at-point-email-regexp from) + (match-string-no-properties 0 from))) + (email (replace-regexp-in-string "[<>]" "" emaildirty))) (if email (cl-dolist (alist mu4e-multi-account-alist) (when (string= email (cdr (assoc 'user-mail-address (cdr alist))))