summaryrefslogtreecommitdiffhomepage
path: root/notmuch.org
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-03-05 19:21:20 +0000
committerjao <jao@gnu.org>2022-03-05 19:23:03 +0000
commite11383ccbc4ad09b06271c2ad2fd3b92b876cce4 (patch)
tree4c72d2761cbd16495964b24980610abbbbd0d766 /notmuch.org
parent2f861fdc7eacdd36140f73dfd042214713cd8dbf (diff)
downloadelibs-e11383ccbc4ad09b06271c2ad2fd3b92b876cce4.tar.gz
elibs-e11383ccbc4ad09b06271c2ad2fd3b92b876cce4.tar.bz2
whitepace and nits
Diffstat (limited to 'notmuch.org')
-rw-r--r--notmuch.org88
1 files changed, 44 insertions, 44 deletions
diff --git a/notmuch.org b/notmuch.org
index 4a0a98d..fee756c 100644
--- a/notmuch.org
+++ b/notmuch.org
@@ -493,50 +493,50 @@
#+end_src
* org mode
Stolen and adapted from [[https://gist.github.com/fedxa/fac592424473f1b70ea489cc64e08911][Fedor Bezrukov]].
- #+begin_src emacs-lisp
- (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
- ((notmuch-show-mode notmuch-tree-mode)
- ;; Store link to the current message
- (let* ((id (notmuch-show-get-message-id))
- (link (concat "notmuch:" id))
- (subj (notmuch-show-get-subject))
- (description (format "Mail: %s" subj)))
- (setq jao-org-notmuch-last-subject subj)
- (when (y-or-n-p "Archive message? ")
- (jao-notmuch--add-tags '("+trove")))
- (when (y-or-n-p "Flag message as todo? ")
- (jao-notmuch--add-tags '("+flagged")))
- (org-store-link-props
- :type "notmuch"
- :link link
- :description description)))
- (notmuch-search-mode
- ;; Store link to the thread on the current line
- (let* ((id (notmuch-search-find-thread-id))
- (link (concat "notmuch:" id))
- (subj (notmuch-search-find-subject))
- (description (format "Mail: %s" subj)))
- (setq jao-org-notmuch-last-subject subj)
- (org-store-link-props
- :type "notmuch"
- :link link
- :description description)))))
-
- (with-eval-after-load "org"
- (org-link-set-parameters "notmuch"
- :follow 'notmuch-show
- :store 'org-notmuch-store-link))
- #+end_src
+ #+begin_src emacs-lisp
+ (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
+ ((notmuch-show-mode notmuch-tree-mode)
+ ;; Store link to the current message
+ (let* ((id (notmuch-show-get-message-id))
+ (link (concat "notmuch:" id))
+ (subj (notmuch-show-get-subject))
+ (description (format "Mail: %s" subj)))
+ (setq jao-org-notmuch-last-subject subj)
+ (when (y-or-n-p "Archive message? ")
+ (jao-notmuch--add-tags '("+trove")))
+ (when (y-or-n-p "Flag message as todo? ")
+ (jao-notmuch--add-tags '("+flagged")))
+ (org-store-link-props
+ :type "notmuch"
+ :link link
+ :description description)))
+ (notmuch-search-mode
+ ;; Store link to the thread on the current line
+ (let* ((id (notmuch-search-find-thread-id))
+ (link (concat "notmuch:" id))
+ (subj (notmuch-search-find-subject))
+ (description (format "Mail: %s" subj)))
+ (setq jao-org-notmuch-last-subject subj)
+ (org-store-link-props
+ :type "notmuch"
+ :link link
+ :description description)))))
+
+ (with-eval-after-load "org"
+ (org-link-set-parameters "notmuch"
+ :follow 'notmuch-show
+ :store 'org-notmuch-store-link))
+ #+end_src
* arXiv
#+begin_src emacs-lisp
(use-package org-capture