summaryrefslogtreecommitdiffhomepage
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/init.el b/init.el
index b1771a4..604ef71 100644
--- a/init.el
+++ b/init.el
@@ -961,8 +961,18 @@
(propertize mtype 'face 'jao-themes-f01))))
(defun jao-recoll-open-html (file &optional page)
- (jao-afio--goto-www)
- (eww-open-file file))
+ (if (string-match-p "\.epub\\'" file)
+ (find-file file)
+ (jao-afio--goto-www)
+ (eww-open-file file)))
+
+(defun jao-recoll-open-pdf (file &optional page)
+ (if (string-match-p "/gnus/Mail/" file)
+ (funcall (or (cdr (assoc-string "message/rfc822" consult-recoll-open-fns))
+ 'find-file)
+ file
+ page)
+ (jao-open-doc file page)))
(defun jao-recoll-consult-messages ()
(interactive)
@@ -979,7 +989,7 @@
(use-package consult-recoll
:init (setq consult-recoll-open-fns
- '(("application/pdf" . jao-open-doc)
+ '(("application/pdf" . jao-recoll-open-pdf)
("text/html" . jao-recoll-open-html))
consult-recoll-search-flags nil
consult-recoll-inline-snippets t