From 55704c31109c278f03d4a1e9c84770d88781d976 Mon Sep 17 00:00:00 2001 From: jao Date: Thu, 25 Mar 2021 17:52:35 +0000 Subject: new message: org link (and use it consistently: notmuch, recoll, etc.) --- lib/doc/jao-recoll.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/doc') diff --git a/lib/doc/jao-recoll.el b/lib/doc/jao-recoll.el index be77100..7c64c7d 100644 --- a/lib/doc/jao-recoll.el +++ b/lib/doc/jao-recoll.el @@ -57,8 +57,13 @@ buffer using org mode." (forward-line 1)) (open-line 1) (while (search-forward-regexp jao-recoll--file-regexp nil t) - (setq lnk (concat "doc:" (file-name-nondirectory (match-string 2)))) - (replace-match "* [[\\2][\\3]] (\\1)") + (setq lnk + (cond ((string= (match-string 1) "application/pdf") + (concat "doc:" (file-name-nondirectory (match-string 2)))) + ((string= (match-string 1) "message/rfc822") + (concat "message:" (substring (match-string 2) 7))) + (t (match-string 2)))) + (replace-match (format "* [[%s][\\3]] (\\1)" lnk)) (forward-line) (let ((kill-whole-line t)) (kill-line)) (while (and (not (eobp)) (not (looking-at-p "/SNIPPETS"))) -- cgit v1.2.3