notmuch-sync: Get config tags dynamically

master
Pierre Neidhardt 2019-03-19 13:53:55 +01:00
parent ac40a90828
commit 92964e44a0
1 changed files with 13 additions and 3 deletions

View File

@ -13,9 +13,19 @@
(call-process notmuch-command nil t
nil "search" "--output=tags" "--exclude=false" "*")))))
(defvar notmuch-unimportant-tags '("attachment" "deleted" "draft" "encrypted"
"flagged" "inbox" "passed" "replied" "sent"
"signed" "unread"))
(defun notmuch-config-get-tags (query)
(split-string
(with-output-to-string
(with-current-buffer standard-output
(call-process notmuch-command nil t
nil "config" "get" query)))))
(defvar notmuch-unimportant-tags (append '("attachment" "draft" "encrypted"
"flagged" "passed" "replied" "sent"
"signed")
(notmuch-config-get-tags "new.tags")
(notmuch-config-get-tags "search.exclude_tags")))
(defvar notmuch-dump-file (expand-file-name "~/personal/mail/notmuch.dump"))
(defun notmuch-dump-important-tags (&optional file)