summaryrefslogtreecommitdiffhomepage
path: root/custom
diff options
context:
space:
mode:
authorjao <jao@gnu.org>2022-06-30 15:30:17 +0100
committerjao <jao@gnu.org>2022-06-30 15:30:59 +0100
commit9af5239971df315d1403733eb1e38039375ffdc9 (patch)
tree2a8612dd655e078f59bbb54790f5fd7e7b8f7b81 /custom
parent1834b5c5c0b0040377328a9f01e25bf87a0d6b8b (diff)
downloadelibs-9af5239971df315d1403733eb1e38039375ffdc9.tar.gz
elibs-9af5239971df315d1403733eb1e38039375ffdc9.tar.bz2
notmuch nits
Diffstat (limited to 'custom')
-rw-r--r--custom/jao-custom-notmuch.el16
1 files changed, 16 insertions, 0 deletions
diff --git a/custom/jao-custom-notmuch.el b/custom/jao-custom-notmuch.el
index 5673242..8c4146a 100644
--- a/custom/jao-custom-notmuch.el
+++ b/custom/jao-custom-notmuch.el
@@ -644,6 +644,22 @@
(with-eval-after-load "notmuch-hello"
(define-key notmuch-hello-mode-map "f" #'jao-consult-notmuch-folder))
+;;; recoll
+(defun jao-notmuch-open-file (fname)
+ (let ((id (with-temp-buffer
+ (insert-file fname)
+ (goto-char (point-min))
+ (when (re-search-forward "[Mm]essage-[Ii][Dd]: <?\\([^><]+\\)>?"
+ nil t)
+ (match-string 1)))))
+ (when id (notmuch-show (concat "id:" id)))))
+
+(with-eval-after-load "org"
+ (org-link-set-parameters "message" :follow #'jao-notmuch-open-file))
+
+(with-eval-after-load "consult-recoll"
+ (add-to-list 'consult-recoll-open-fns
+ ("message/rfc822" . jao-notmuch-open-file)))
;;; link hint
(with-eval-after-load "link-hint"