From aa1f1429003ff8ac8a408b057864ba83f7ba6428 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Thu, 12 Sep 2019 19:34:06 -0400 Subject: org-capture: Auto-stash in notmuch subjects --- init.el | 6 ++++++ 1 file changed, 6 insertions(+) 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)) -- cgit v1.2.3