Add org handler for 'pdf:' link

This commit is contained in:
Adam Goldsmith 2020-04-14 03:22:29 -04:00
parent df8011a034
commit 9b8a96cbb3
1 changed files with 8 additions and 1 deletions

View File

@ -256,7 +256,14 @@
:config
(org-babel-do-load-languages
'org-babel-load-languages
'((ipython . t)))))
'((ipython . t))))
(defun org-link--open-pdf (path)
(let ((path-parts (split-string path "::")))
(apply 'call-process "evince" nil 0 nil (car path-parts)
(when (cadr path-parts) (list "--page-index" (cadr path-parts))))))
(org-link-set-parameters "pdf" :follow 'org-link--open-pdf))
(use-package windmove :demand
:config