From 1eff55d01b87cef0cead873f66d9bddc9d1cde65 Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Wed, 12 Apr 2023 11:12:52 -0400 Subject: [PATCH] Improve handling of email address filtering --- global.org | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/global.org b/global.org index 4dcfa63..e573108 100644 --- a/global.org +++ b/global.org @@ -897,11 +897,13 @@ #+begin_src emacs-lisp (load-file "~/.emacs.d/filtered-emails.el") + (defun wilder/filter--from-list (address list) + (if (not list) address + (and (not (string-equal address (car list))) + (wilder/filter--from-list address (cdr list))))) + (defun my-mu4e-contact-filter-function (addr) - (let ((ignore nil)) - (if (dolist (address filter-addresses ignore) - (setq ignore (or ignore (string-equal addr address)))) - nil addr))) + (wilder/filter--from-list addr filter-addresses)) (setq mu4e-contact-process-function 'my-mu4e-contact-filter-function) #+end_src