9

I am using Emacs 25.1 run with emacs -Q and Org mode version 8.2.10. This problem persists in my customized Emacs with Org mode version 8.3.6.

I am attempting to open hyperlinks of the form

[[file:documenterino.pdf][documenterino]]

using the external default pdf viewer, evince. When I create the above link, it turns into a blue, underlined documenterino. If I use C-c C-o, C-u C-c C-o, or C-u C-u C-c C-o on it, I get the same result every time: the pdf opens in a new docview buffer in emacs, when I want it to open outside emacs in evince.

I tried changing file: to file+sys:, and ~/documents/documenterino.pdf instead of documenterino.pdf, but there is no change.

LMouse, RMouse, and MMouse also open in doc-view regardless of changes.

0

2 Answers 2

7

I fixed the problem by using M-x customize-variable org-file-apps and adding a cons-cell with Extension: \.pdf\' and Command: evince %s at the top.

emacs customize screen

Oddly enough, links starting with file+sys: still open in emacs doc-view, while links starting with file: open in evince (regadless of absolute or relative path). But I don't care because there's no autocompletion for file+sys: anyway.

5

I added (add-to-list 'org-file-apps '("pdf" . "evince %s")) to my init-file. Now C-c C-o opens any PDF in evince and C-u C-u C-c C-o opens them in doc-view.

3
  • Same behaviour persists.
    – Zacatexas
    Commented Oct 23, 2016 at 16:57
  • Have you evaluated the form with C-x C-e or restarted Emacs? Commented Oct 23, 2016 at 17:15
  • Yes. I've seen this advice in a bunch of other places too, often it comes with a lot of backslashes and dots in various places (eg '("\\.pdf\\" . "evince \\%s\\"") . Never does anything, always defaults to doc-view. Even tried using this command in emacs -Q (after ('require org), since it won't run otherwise) and nothing changes.
    – Zacatexas
    Commented Oct 23, 2016 at 17:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.