From 41e6a9cf142465633b7128a3b0e284ff6cb582d7 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sat, 15 Feb 2020 22:44:15 +0100 Subject: Conform to org-link-store API --- nov.el | 15 +++++++-------- 1 file 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" -- cgit v1.2.3