summaryrefslogtreecommitdiffhomepage
path: root/email.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2021-06-05 02:51:44 +0100
committerjao <jao@gnu.org>2021-06-05 02:51:44 +0100
commit3b3faca3394fcac2613bccfdc84e4509a262630f (patch)
treec20fe4b06d479722b35780eb3916086c8723594a /email.org
parentf5185b2860f737a8b782b08569b02de0c3176aa0 (diff)
downloadelibs-3b3faca3394fcac2613bccfdc84e4509a262630f.tar.gz
elibs-3b3faca3394fcac2613bccfdc84e4509a262630f.tar.bz2
notmuch: drafts handling
Diffstat (limited to 'email.org')
-rw-r--r--email.org27
1 files changed, 18 insertions, 9 deletions
diff --git a/email.org b/email.org
index 07ab00a..e1897e9 100644
--- a/email.org
+++ b/email.org
@@ -278,7 +278,9 @@
(use-package notmuch
:ensure t
:init
- (setq notmuch-hello-sections '(notmuch-hello-insert-saved-searches
+ (setq notmuch-draft-folder "trove/drafts"
+ notmuch-draft-quoted-tags '("part")
+ notmuch-hello-sections '(notmuch-hello-insert-saved-searches
notmuch-hello-insert-alltags
notmuch-hello-insert-header)
notmuch-hello-thousands-separator ","
@@ -301,6 +303,9 @@
:config
+ (when (eq 'notmuch jao-afio-mail-function)
+ (setq mm-text-html-renderer 'shr))
+
(defun jao-notmuch-refresh-hello ()
(interactive)
(when (derived-mode-p 'notmuch-hello-mode)
@@ -371,8 +376,8 @@
,@(jao-notmuch--mboxes-search "jao" "inbox")
,@(jao-notmuch--mboxes-search "feeds")
,(jao-notmuch--q "gmane" nil "g" '("tag:gmane" "tag:new"))
- ,(jao-notmuch--q "bml/today" nil "tb" '("tag:bigml" "date:1d.."))
- ,(jao-notmuch--q "jao/today" nil "tj" '("tag:jao" "date:1d.."))
+ ,(jao-notmuch--q "bml/today" nil "tb" '("tag:bigml" "date:1d..") t)
+ ,(jao-notmuch--q "jao/today" nil "tj" '("tag:jao" "date:1d..") t)
,(jao-notmuch--q "flagged" nil "r" '("tag:flagged") t)
,(jao-notmuch--q "new" nil "n" '("tag:new"))
,(jao-notmuch--q "draft" nil "d" '("tag:draft"))))
@@ -521,6 +526,15 @@
(with-eval-after-load "notmuch"
(advice-add 'notmuch-clean-address :around #'jao-mail-clean-address))
#+end_src
+*** mua
+ #+begin_src emacs-lisp
+ (when (eq jao-afio-mail-function 'notmuch)
+ (setq message-directory "~/var/mail/"
+ message-auto-save-directory "/tmp")
+ (with-eval-after-load "notmuch-message"
+ (define-key message-mode-map (kbd "C-c C-d")
+ #'notmuch-draft-postpone)))
+ #+end_src
*** minibuffer notifications
#+begin_src emacs-lisp
(defvar jao-notmuch-minibuffer-string "")
@@ -555,11 +569,6 @@
(when (eq jao-afio-mail-function 'notmuch)
(jao-minibuffer-add-variable 'jao-notmuch-minibuffer-string -20))
#+end_src
-*** shr
- #+begin_src emacs-lisp
- (when (eq 'notmuch jao-afio-mail-function)
- (setq mm-text-html-renderer 'shr))
- #+end_src
*** consult
#+begin_src emacs-lisp
(use-package consult-notmuch
@@ -658,7 +667,7 @@
function tag_deleted {
notmuch tag +deleted -- \
"folder:\"/$1/\"" AND date:..${2:-3d} \
- AND NOT "tag:\"/^(trove|new|flagged|unread)$/\""
+ AND NOT "tag:\"/^(trove|new|flagged|unread|draft)$/\""
}
tag_deleted "bigml.(drivel|lists|deploys|bugs)" 3d