diff options
author | Vasilij Schneidermann <mail@vasilij.de> | 2020-02-15 22:44:15 +0100 |
---|---|---|
committer | Vasilij Schneidermann <mail@vasilij.de> | 2020-02-15 22:44:15 +0100 |
commit | 41e6a9cf142465633b7128a3b0e284ff6cb582d7 (patch) | |
tree | fbcc5c0919a40637b79cd80754b1cb337ffc2032 /nov.el | |
parent | 77a339fa40b32075bd3fc8ca6f1cf338a226e665 (diff) |
Conform to org-link-store API
Diffstat (limited to 'nov.el')
-rw-r--r-- | nov.el | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -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" |