summaryrefslogtreecommitdiffhomepage
path: root/notmuch.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-01-06 02:17:50 +0000
committerjao <jao@gnu.org>2022-01-06 02:17:50 +0000
commitc95ba817188d6e2c1ae561c920f4589a0dfba750 (patch)
treea1d34539df517c01004cb4c2c159d972bebc69c1 /notmuch.org
parenta26238003a158373d54ab3d8eef7822aab130cb8 (diff)
downloadelibs-c95ba817188d6e2c1ae561c920f4589a0dfba750.tar.gz
elibs-c95ba817188d6e2c1ae561c920f4589a0dfba750.tar.bz2
notmuch: offer 'todo' tag in org capture
Diffstat (limited to 'notmuch.org')
-rw-r--r--notmuch.org18
1 files changed, 9 insertions, 9 deletions
diff --git a/notmuch.org b/notmuch.org
index 27ffa13..cac76cb 100644
--- a/notmuch.org
+++ b/notmuch.org
@@ -324,8 +324,6 @@
(replace-regexp-in-string "\"" "" (buffer-string)))
(replace-regexp-in-string jao-mail-clean-rx "" address)))))
- (defun jao-notmuch-show-setup () (setq header-line-format nil))
-
(use-package notmuch-show
:init
(setq gnus-blocked-images "."
@@ -340,6 +338,7 @@
:config
(advice-add 'notmuch-clean-address :filter-args #'jao-mail-clean-address)
+ (defun jao-notmuch-show-setup () (setq header-line-format nil))
(add-hook 'notmuch-show-hook #'jao-notmuch-show-setup)
(jao-notmuch-show-prefer-html)
@@ -469,6 +468,11 @@
(defvar jao-org-notmuch-last-subject nil)
(defun jao-org-notmuch-last-subject () jao-org-notmuch-last-subject)
+ (defun jao-notmuch--add-tags (tags)
+ (if (derived-mode-p 'notmuch-show-mode)
+ (notmuch-show-add-tag tags)
+ (notmuch-tree-add-tag tags)))
+
(defun org-notmuch-store-link ()
"Store a link to a notmuch mail message."
(cl-case major-mode
@@ -480,13 +484,9 @@
(description (format "Mail: %s" subj)))
(setq jao-org-notmuch-last-subject subj)
(when (y-or-n-p "Archive message? ")
- (if (derived-mode-p 'notmuch-show-mode)
- (notmuch-show-archive-message)
- (notmuch-tree-archive-message)))
- (when (y-or-n-p "Flag message? ")
- (if (derived-mode-p 'notmuch-show-mode)
- (notmuch-show-add-tag '("+flagged"))
- (notmuch-tree-add-tag '("+flagged"))))
+ (jao-notmuch--add-tags '("+trove")))
+ (when (y-or-n-p "Flag message as todo? ")
+ (jao-notmuch--add-tags '("+todo")))
(org-store-link-props
:type "notmuch"
:link link