aboutsummaryrefslogtreecommitdiff
path: root/nov.el
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2020-05-03 22:07:31 +0200
committerVasilij Schneidermann <mail@vasilij.de>2020-05-03 22:07:31 +0200
commit865630a4fb8260a31905286f3443bdabb93ea46c (patch)
tree835f309e1fadbb52ff652d84bab7a003e824b722 /nov.el
parent7047aae31c9dd17dc6378d895379cb49c6a218dc (diff)
Clean up previous contributions
Diffstat (limited to 'nov.el')
-rw-r--r--nov.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/nov.el b/nov.el
index 8097fb1..b65ec64 100644
--- a/nov.el
+++ b/nov.el
@@ -48,9 +48,11 @@
(require 'esxml-query)
(require 'shr)
(require 'url-parse)
-(require 'recentf)
+
(require 'bookmark)
+(require 'imenu)
(require 'org)
+(require 'recentf)
(when (not (fboundp 'libxml-parse-xml-region))
(message "Your Emacs wasn't compiled with libxml support"))
@@ -797,6 +799,7 @@ Saving is only done if `nov-save-place-file' is set."
;;; recentf interop
(defun nov-add-to-recentf ()
+ "Add real path to recentf list if possible."
(when nov-file-name
(recentf-add-file nov-file-name)))
@@ -816,7 +819,7 @@ Saving is only done if `nov-save-place-file' is set."
(nov-render-document)
(goto-char point))
-;; Bookmark Integration
+;; Bookmark interop
(defun nov-bookmark-make-record ()
"Create a bookmark epub record."
(cons (buffer-name)
@@ -835,9 +838,10 @@ See also `nov-bookmark-make-record'."
(nov--find-file file index position)))
-;;; org interop
+;;; Org interop
(defun nov-org-link-follow (path)
+ "Follow nov: link designated by PATH."
(if (string-match "^\\(.*\\)::\\([0-9]+\\):\\([0-9]+\\)$" path)
(let ((file (match-string 1 path))
(index (string-to-number (match-string 2 path)))
@@ -846,6 +850,7 @@ See also `nov-bookmark-make-record'."
(error "Invalid nov.el link")))
(defun nov-org-link-store ()
+ "Store current EPUB location as nov: link."
(when (and (eq major-mode 'nov-mode) nov-file-name)
(when (not (integerp nov-documents-index))
(setq nov-documents-index 0))