summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lib/net/jao-notmuch.el10
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)