From efb556e41a90ecfa4c14de0033b087a5e91df214 Mon Sep 17 00:00:00 2001 From: jao Date: Mon, 29 Aug 2022 20:33:42 +0100 Subject: notmuch: no fcc for List-Id replies --- lib/net/jao-notmuch.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/net') 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) -- cgit v1.2.3