From: Mark Wooding Date: Sun, 24 May 2020 01:50:31 +0000 (+0100) Subject: dot/vm: Make `vm-reply-ignored-addresses' patterns match correctly. X-Git-Url: https://git.distorted.org.uk/~mdw/profile/commitdiff_plain/4ecc8e686b58c7137f9a9e1b2373b40cabb22ef7 dot/vm: Make `vm-reply-ignored-addresses' patterns match correctly. They're taken from the BBDB patterns, but BBDB only matches the actual mailbox part of an address, while VM wants to match the entire address string. Strip off leading `^' and trailing `$', and wrap `\<...\>' around instead. --- diff --git a/dot/vm b/dot/vm index 751b107..c982842 100644 --- a/dot/vm +++ b/dot/vm @@ -29,7 +29,13 @@ "subject:" "date:" "delivered-to:" "return-path:")) -(setq vm-reply-ignored-addresses (cons bbdb-user-mail-names nil)) +(setq vm-reply-ignored-addresses + (let ((pat bbdb-user-mail-names)) + (if (string-prefix-p "^" pat) + (setq pat (substring pat 1))) + (if (string-suffix-p "$" pat) + (setq pat (substring pat 0 (1- (length pat))))) + (cons (concat "\\<" pat "\\>") nil))) (defvar mdw-mailing-lists '("hibachi-dealers-members@chiark\\.greenend\\.org\\.uk"))