From e11383ccbc4ad09b06271c2ad2fd3b92b876cce4 Mon Sep 17 00:00:00 2001 From: jao Date: Sat, 5 Mar 2022 19:21:20 +0000 Subject: whitepace and nits --- notmuch.org | 88 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'notmuch.org') 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 -- cgit v1.2.3