From f9fffedbd76d2450abe68d832cd868afb9fccf48 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 29 Jul 2021 02:53:40 +0100 Subject: notmuch: more address cleaning --- exwm.org | 2 +- notmuch.org | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/exwm.org b/exwm.org index 79c2f1e..d28b740 100644 --- a/exwm.org +++ b/exwm.org @@ -510,7 +510,7 @@ ([?\s-a] . jao-first-window) ([?\s-b] . jao-hydra-org-blog/body) ([?\s-c] . jao-hydra-chats/body) - ([?\s-f] . jao-exwm-firefox-1) + ([?\s-e] . jao-exwm-firefox-1) ([?\s-t] . jao-term-here-toggle) ([?\s-n] . jao-hydra-ednc/body) ([?\s-O] . jao-transpose-windows) diff --git a/notmuch.org b/notmuch.org index 20ddebc..1f92de7 100644 --- a/notmuch.org +++ b/notmuch.org @@ -180,6 +180,10 @@ (define-key message-mode-map (kbd "C-c C-d") #'notmuch-draft-postpone))) + (defconst jao-mail-clean-rx + (regexp-opt '("ElDiario.es - ElDiario.es: " "The Guardian: " + "The Conversation – Articles (UK): "))) + (defun jao-mail-clean-address (fun address) (let ((address (if (string-match ".+ updates on arXiv.org: \\(.+\\)" address) @@ -188,7 +192,7 @@ (let ((shr-width 1000)) (shr-render-region (point-min) (point-max))) (replace-regexp-in-string "\"" "" (buffer-string))) - (string-replace "ElDiario.es - ElDiario.es" "D" address)))) + (replace-regexp-in-string jao-mail-clean-rx "" address)))) (funcall fun address))) (advice-add 'notmuch-clean-address :around #'jao-mail-clean-address) -- cgit v1.2.3