diff options
author | jao <jao@gnu.org> | 2021-03-25 17:52:35 +0000 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-03-25 17:52:35 +0000 |
commit | 55704c31109c278f03d4a1e9c84770d88781d976 (patch) | |
tree | 6bee556d70fa61f761bacc4ab719ab3b4be4862f /lib/doc | |
parent | ec9aa2881c1bfd3cfde296f84d9fb71490961cc0 (diff) | |
download | elibs-55704c31109c278f03d4a1e9c84770d88781d976.tar.gz elibs-55704c31109c278f03d4a1e9c84770d88781d976.tar.bz2 |
new message: org link (and use it consistently: notmuch, recoll, etc.)
Diffstat (limited to 'lib/doc')
-rw-r--r-- | lib/doc/jao-recoll.el | 9 |
1 files changed, 7 insertions, 2 deletions
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"))) |