diff options
author | jao <jao@gnu.org> | 2022-08-29 20:33:42 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2022-08-29 20:33:42 +0100 |
commit | efb556e41a90ecfa4c14de0033b087a5e91df214 (patch) | |
tree | 0e505f5d33462a503a1e7f1fc24c4de8bb15f953 /lib/net | |
parent | 17b44ffaed4005a7d3267668beb372b4235472de (diff) | |
download | elibs-efb556e41a90ecfa4c14de0033b087a5e91df214.tar.gz elibs-efb556e41a90ecfa4c14de0033b087a5e91df214.tar.bz2 |
notmuch: no fcc for List-Id replies
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/jao-notmuch.el | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/net/jao-notmuch.el b/lib/net/jao-notmuch.el index fa4fee5..2a5e772 100644 --- a/lib/net/jao-notmuch.el +++ b/lib/net/jao-notmuch.el @@ -422,7 +422,7 @@ (defvar jao-notmuch-mua-reply-not-inherited '("attachment" "sent" "new" "bigml" "jao" "trove")) -(defun jao-notmuch-mua-new-reply (fun &rest args) +(defun jao-notmuch-mua--fcc-dirs () (let* ((otags (notmuch-show-get-tags)) (trove (or (seq-some (lambda (x) (and (member x otags) x)) '("hacking" "bills" "feeds" "jao")) @@ -430,8 +430,12 @@ (tags (seq-difference otags jao-notmuch-mua-reply-not-inherited)) (tagstr (mapconcat (lambda (s) (concat "+" s)) tags " ")) (fcc (concat "trove/" trove " " tagstr " -new +sent +trove")) - (fcc-dirs (assoc-delete-all ".*" (copy-alist notmuch-fcc-dirs))) - (notmuch-fcc-dirs (append fcc-dirs `((".*" . ,fcc))))) + (fcc-dirs (assoc-delete-all ".*" (copy-alist notmuch-fcc-dirs)))) + (append fcc-dirs `((".*" . ,fcc)))(apply fun args))) + +(defun jao-notmuch-mua-new-reply (fun &rest args) + (let ((notmuch-fcc-dirs (and (not (notmuch-show-get-header :List-Id)) + (jao-notmuch-mua--fcc-dirs)))) (apply fun args))) (advice-add 'notmuch-mua-new-reply :around #'jao-notmuch-mua-new-reply) |