Skip to content

Commit

Permalink
Conditionally use new org (v. 9) api for link type
Browse files Browse the repository at this point in the history
  • Loading branch information
andersjohansson committed Oct 11, 2016
1 parent 569b221 commit 5ed6b51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions org-pdfview.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
(require 'pdf-tools)
(require 'pdf-view)

(org-add-link-type "pdfview" 'org-pdfview-open 'org-pdfview-export)
(add-hook 'org-store-link-functions 'org-pdfview-store-link)
(if (fboundp 'org-link-set-parameters)
(org-link-set-parameters "pdfview"
:follow #'org-pdfview-open
:store #'org-pdfview-store-link)
(org-add-link-type "pdfview" 'org-pdfview-open)
(add-hook 'org-store-link-functions 'org-pdfview-store-link))

(defun org-pdfview-open (link)
"Open LINK in pdf-view-mode."
Expand Down

0 comments on commit 5ed6b51

Please sign in to comment.