-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pdftools: org link type not recognized + xdg-open is used instead of pdfview #52
Comments
Some more infos:
|
Looking through the source code I suspect that the correct org link type is pdf: and not pdftools: as written in the README.org It still remains unclear to me why links of the type [[./file.pdf]] are opened using xdg-open instead of being open within emacs. Any idea? Thx. |
Hi @malanders380 could you solve the issue? I am facing the same thing, the prefix "pdftools:" before the file destination does not work, and if I put only "pdf" it opens it, but if you open a pdf with comments, you won't be able to see them. You will only see the plain pdf. |
It would be ideal if all of the below would be opened properly inside emacs using pdftools:
|
Just to clarify a bit, if one does not configure |
Hi, just in case someone still have the same problem. I follow the README instructions and copy the suggested config. Until now all features seem to work but in org-mode pdf links only open with DocView not PDFview. I try a feel changes to this block of code but none of then worked: ;; Original (README recomended)
(use-package org-pdftools
:hook (org-mode . org-pdftools-setup-link))
;; Failed fixes
(use-package org-pdftools
:ensure t
:hook (org-mode . org-pdftools-setup-link))
(use-package org-pdftools
:ensure t
:after org
:hook (org-mode . org-pdftools-setup-link))
(use-package org-pdftools
:ensure t
:after org-noter
:hook (org-mode . org-pdftools-setup-link))
(use-package org-pdftools
:ensure t
:hook (org-noter . org-pdftools-setup-link)) After some research i was able to activate PDFview everywhere by adding this code to the recommended config: ;;(use-package org-pdftools
;; :ensure t
;; :hook (org-mode . org-pdftools-setup-link))
;; source code from: http://alberto.am/2020-04-11-pdf-tools-as-default-pdf-viewer.html
(use-package pdf-tools
:pin manual
:config
(pdf-tools-install)
(setq-default pdf-view-display-size 'fit-width)
(define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward)
:custom
(pdf-annot-activate-created-annotations t "automatically annotate highlights"))
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view))
TeX-source-correlate-start-server t)
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
(add-hook 'pdf-view-mode-hook (lambda() (linum-mode -1)))
Is there an easier way to do this ? my emacs version: GNU Emacs 26.3 ORG-NOTER ORG-NOTER-PDFTOOLS Thanks for the work ! it is a very helpful tool |
I just installed pdf-tools and org-pdftools and have the following two weird behaviors:
Any links of the form [[./file.pdf]] within a org file gets opened externally using /usr/bin/xdg-open instead of within emacs! (but if I click on a file from within dired, it gets properly opened within emacs with pdfview)
Any links of the form [[pdftools:./file.pdf]] within a org file does not get opened at all. When clinking on the link the following result is shown "No match - create this as a new heading? (y or n)". Then entering "n" appears "No match for fuzzy expression: pdftools:./file.pdf". Does org-pdftools not play well with other packages?
Emacs version: GNU Emacs 27.1
pdftools configuration:
(use-package pdf-tools
:ensure t
:config
(pdf-tools-install)
(setq-default pdf-view-display-size 'fit-width)
(define-key pdf-view-mode-map (kbd "C-s") 'isearch-forward)
(setq pdf-annot-activate-created-annotations nil)
(setq pdf-view-resize-factor 1.1)
(setq TeX-view-program-selection '((output-pdf "PDF Tools"))
TeX-view-program-list '(("PDF Tools" TeX-pdf-tools-sync-view))
TeX-source-correlate-start-server t)
(add-hook 'TeX-after-compilation-finished-functions
#'TeX-revert-document-buffer)
)
org-pdftools configuration:
(use-package org-pdftools
:ensure t
:hook (org-mode . org-pdftools-setup-link))
(use-package org-noter-pdftools
:ensure t
:after org-noter
:config
(with-eval-after-load 'pdf-annot
(add-hook 'pdf-annot-activate-handler-functions #'org-noter-pdftools-jump-to-note)))
Any help to fix the two issues would be greatly appreciated, thank you.
The text was updated successfully, but these errors were encountered: