summaryrefslogtreecommitdiffhomepage
path: root/notmuch.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-09-09 02:12:36 +0100
committerjao <jao@gnu.org>2021-09-09 02:12:36 +0100
commitaa3ca5e0f446fc06346a49b0cdd4ce1080a0d0e1 (patch)
tree7913880b1735d4330d3ec077be6b3d28327f0448 /notmuch.org
parent2c5e6cae722f922811e30ee767578eebdfc1e439 (diff)
downloadelibs-aa3ca5e0f446fc06346a49b0cdd4ce1080a0d0e1.tar.gz
elibs-aa3ca5e0f446fc06346a49b0cdd4ce1080a0d0e1.tar.bz2
notmuch tweaks (advice with filter-return/args)
Diffstat (limited to 'notmuch.org')
-rw-r--r--notmuch.org29
1 files changed, 16 insertions, 13 deletions
diff --git a/notmuch.org b/notmuch.org
index 0ca72f5..cbfee86 100644
--- a/notmuch.org
+++ b/notmuch.org
@@ -128,6 +128,10 @@
'(("unread")
("new")
(".*" (notmuch-apply-face tag 'notmuch-tag-deleted))))
+
+ (with-eval-after-load "notmuch-tag"
+ (advice-add #'notmuch-read-tag-changes
+ :filter-return (lambda (x) (mapcar #'string-trim x))))
#+end_src
* package
#+begin_src emacs-lisp
@@ -151,7 +155,8 @@
(when (eq 'notmuch jao-afio-mail-function)
(setq message-directory "~/var/mail/"
- message-auto-save-directory "/tmp"))
+ message-auto-save-directory "/tmp"
+ mail-user-agent 'sendmail-user-agent))
:bind (:map notmuch-common-keymap
(("E" . jao-notmuch-open-enclosure)
@@ -241,17 +246,15 @@
(regexp-opt '("ElDiario.es - ElDiario.es: " "The Guardian: "
"The Conversation – Articles (UK): ")))
- (defun jao-mail-clean-address (fun address)
- (when address
- (let ((address
- (if (string-match ".+ updates on arXiv.org: \\(.+\\)" address)
- (with-temp-buffer
- (insert (match-string 1 address))
- (let ((shr-width 1000))
- (shr-render-region (point-min) (point-max)))
- (replace-regexp-in-string "\"" "" (buffer-string)))
- (replace-regexp-in-string jao-mail-clean-rx "" address))))
- (funcall fun address))))
+ (defun jao-mail-clean-address (args)
+ (when-let ((address (car args)))
+ (list (if (string-match ".+ updates on arXiv.org: \\(.+\\)" address)
+ (with-temp-buffer
+ (insert (match-string 1 address))
+ (let ((shr-width 1000))
+ (shr-render-region (point-min) (point-max)))
+ (replace-regexp-in-string "\"" "" (buffer-string)))
+ (replace-regexp-in-string jao-mail-clean-rx "" address)))))
(defun jao-notmuch-show-setup () (setq header-line-format nil))
@@ -268,7 +271,7 @@
:config
- (advice-add 'notmuch-clean-address :around #'jao-mail-clean-address)
+ (advice-add 'notmuch-clean-address :filter-args #'jao-mail-clean-address)
(add-hook 'notmuch-show-hook #'jao-notmuch-show-setup)
(jao-notmuch-show-prefer-html)