Merge pull request #948 from patrl/org-pdfview

Open org links with `pdf-view-mode` (with `:tools pdf`)
This commit is contained in:
Henrik Lissner 2018-10-15 00:15:20 -04:00 committed by GitHub
commit efed58fcc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View file

@ -52,6 +52,17 @@
:after org-agenda
:config (evil-org-agenda-set-keys)))
(def-package! org-pdfview
:when (featurep! :tools pdf)
:commands (org-pdfview-open)
:init
(after! org
(delete '("\\.pdf\\'" . default) org-file-apps)
;; org links to pdf files are opened in pdf-view-mode
(add-to-list 'org-file-apps '("\\.pdf\\'" . (lambda (_file link) (org-pdfview-open link))))
;; support for links to specific pages
(add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . (lambda (_file link) (org-pdfview-open link))))))
;;
;; Bootstrap

View file

@ -11,6 +11,9 @@
(when (featurep! :feature evil)
(package! evil-org))
(when (featurep! :tools pdf)
(package! org-pdfview))
(when (featurep! +attach)
(package! org-download))