From 3b3faca3394fcac2613bccfdc84e4509a262630f Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 5 Jun 2021 02:51:44 +0100 Subject: notmuch: drafts handling --- email.org | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'email.org') 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 -- cgit v1.2.3