From 68f5b349a6ef4b8daa0140c52e317566a4d38c91 Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sat, 29 Aug 2020 02:23:51 +0200 Subject: Support Org versions < 9.0 --- nov.el | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'nov.el') diff --git a/nov.el b/nov.el index 68d0d3a..1b28a81 100644 --- a/nov.el +++ b/nov.el @@ -857,10 +857,15 @@ See also `nov-bookmark-make-record'." :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" - :follow 'nov-org-link-follow - :store 'nov-org-link-store) +(cond + ((version< org-version "9.0") + (org-add-link-type "nov" 'nov-org-link-follow) + (add-hook 'org-store-link-functions 'nov-org-link-store)) + (t + (org-link-set-parameters + "nov" + :follow 'nov-org-link-follow + :store 'nov-org-link-store))) ;;; Imenu interop -- cgit v1.2.3