From ca97d8c026a857f9d7760df8842f452f1061caa9 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 18 Oct 2020 12:54:52 +0300 Subject: [PATCH] mu4e: mu4e-contact-process-function: filter out no-reply addresses Add a default mu4e-contact-process-function, filtering out various no-reply addresses. --- mu4e/mu4e-vars.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mu4e/mu4e-vars.el b/mu4e/mu4e-vars.el index 12802d77..e011bc4c 100644 --- a/mu4e/mu4e-vars.el +++ b/mu4e/mu4e-vars.el @@ -448,7 +448,10 @@ their canonical counterpart; useful as an example." (make-obsolete-variable 'mu4e-compose-complete-ignore-address-regexp "mu4e-contact-process-function (see docstring)" "mu4e 1.3.2") -(defcustom mu4e-contact-process-function nil +(defcustom mu4e-contact-process-function + (lambda(addr) ;; filter-out no-reply addresses + (unless (string-match-p "no[t]?[-\\.]?repl\\(y\\|ies\\)" addr) + addr)) "Function for processing contact information for use in auto-completion. The function receives the contact as a string, e.g