diff options
author | Yuchen Pei <id@ypei.org> | 2025-03-18 19:16:04 +1100 |
---|---|---|
committer | Yuchen Pei <id@ypei.org> | 2025-03-18 19:16:04 +1100 |
commit | bc4b35a13d869f41d23e0506176e0a4b05f29825 (patch) | |
tree | 9a48a7c0c7548f0e4c1dad9f02726bc59489fe0e /emacs/.emacs.d/lisp/my/my-nov.el | |
parent | 22b985173073b9f4ae832278a2625511af3f79e4 (diff) |
Diffstat (limited to 'emacs/.emacs.d/lisp/my/my-nov.el')
-rw-r--r-- | emacs/.emacs.d/lisp/my/my-nov.el | 8 |
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") |