aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my/my-nov.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-nov.el')
-rw-r--r--emacs/.emacs.d/lisp/my/my-nov.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-nov.el b/emacs/.emacs.d/lisp/my/my-nov.el
index 816afc6..9a819c7 100644
--- a/emacs/.emacs.d/lisp/my/my-nov.el
+++ b/emacs/.emacs.d/lisp/my/my-nov.el
@@ -45,6 +45,14 @@ chapter title."
(concat title ": " chapter-title))
))
+(defun my-nov-find-file-with-ipath (file-name ipath)
+ "Find epub file and goto IPATH.
+
+Useful for recoll."
+ (find-file file-name)
+ (unless (derived-mode-p 'nov-mode) (nov-mode))
+ (nov-goto-document (nov-find-document (lambda (p) (eq ipath (car p))))))
+
(defun my-nov-scroll-up (arg)
"Scroll with `scroll-up' or visit next chapter if at bottom."
(interactive "P")