aboutsummaryrefslogtreecommitdiff
path: root/nov.el
diff options
context:
space:
mode:
Diffstat (limited to 'nov.el')
-rw-r--r--nov.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/nov.el b/nov.el
index f08c481..09916c7 100644
--- a/nov.el
+++ b/nov.el
@@ -816,14 +816,13 @@ Saving is only done if `nov-save-place-file' is set."
(error "Invalid nov.el link")))
(defun nov-org-link-store ()
- (when (not (and (eq major-mode 'nov-mode) nov-file-name))
- (error "Not in a nov.el buffer"))
- (when (not (integerp nov-documents-index))
- (setq nov-documents-index 0))
- (org-store-link-props
- :type "nov"
- :link (format "nov:%s::%d:%d" nov-file-name nov-documents-index (point))
- :description (format "EPUB file at %s" nov-file-name)))
+ (when (and (eq major-mode 'nov-mode) nov-file-name)
+ (when (not (integerp nov-documents-index))
+ (setq nov-documents-index 0))
+ (org-store-link-props
+ :type "nov"
+ :link (format "nov:%s::%d:%d" nov-file-name nov-documents-index (point))
+ :description (format "EPUB file at %s" nov-file-name))))
(org-link-set-parameters
"nov"