summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2019-09-12 19:34:06 -0400
committerKyle Meyer <kyle@kyleam.com>2019-10-10 18:14:17 -0400
commitaa1f1429003ff8ac8a408b057864ba83f7ba6428 (patch)
tree9a872b3a60e5336117644cd89e394b741fae38a0 /init.el
parent39287de1f7312cfbe6cb3436981fd5fda4dd1ee7 (diff)
downloademacs.d-aa1f1429003ff8ac8a408b057864ba83f7ba6428.tar.gz
org-capture: Auto-stash in notmuch subjects
Diffstat (limited to 'init.el')
-rw-r--r--init.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/init.el b/init.el
index d9721d5..321daac 100644
--- a/init.el
+++ b/init.el
@@ -216,6 +216,12 @@
:config
(add-hook 'org-capture-before-finalize-hook #'save-buffer)
+ (advice-add 'org-capture :around
+ (lambda (fn &rest args)
+ (when (derived-mode-p 'notmuch-show-mode)
+ (notmuch-show-stash-subject))
+ (apply fn args)))
+
(require 'org-agenda)
(require 'org-contacts))