diff options
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"))) |