Configurable sync backends for NotMuch

This commit is contained in:
Aidan Gilmore 2018-08-08 12:06:07 -04:00
parent b349dd3473
commit 2e98e1ae50
No known key found for this signature in database
GPG key ID: F92E3698096A0D3B
2 changed files with 15 additions and 1 deletions

View file

@ -35,7 +35,15 @@
(interactive) (interactive)
(start-process-shell-command (start-process-shell-command
"notmuch update" nil "notmuch update" nil
"cd ~/.mail/account.gmail && /usr/local/bin/gmi push && /usr/local/bin/gmi pull && /usr/local/bin/notmuch new && /usr/local/bin/afew -a -t")) (pcase +notmuch-sync-backend
(`gmi
(concat "cd " +notmuch-mail-folder " && gmi push && gmi pull && notmuch new && afew -a -t"))
(`mbsync
"mbsync -a && notmuch new && afew -a -t")
(`mbsync-xdg
"mbsync -c \"$XDG_CONFIG_HOME\"/isync/mbsyncrc -a && notmuch new && afew -a -t")
(`offlineimap
"offlineimap && notmuch new && afew -a -t"))))
;;;###autoload ;;;###autoload
(defun +notmuch/search-delete () (defun +notmuch/search-delete ()

View file

@ -2,6 +2,12 @@
;; FIXME This module is a WIP! ;; FIXME This module is a WIP!
(defvar +notmuch-sync-backend 'gmi
"Which backend to use. Can be either gmi, mbsync, offlineimap or nil (manual).")
(defvar +notmuch-mail-folder "~/.mail/account.gmail"
"Where your email folder is located (for use with gmailieer).")
(after! notmuch (after! notmuch
(set-company-backend! 'notmuch-message-mode (set-company-backend! 'notmuch-message-mode
'(notmuch-company (company-ispell :with company-yasnippet))) '(notmuch-company (company-ispell :with company-yasnippet)))