4

My default PDF viewer is Evince and I'm running Linux Mint 15 with Cinnamon. If, for instance, I double-click a PDF file on my Desktop, it opens in Evince as expected.

In my org-file-apps variable I have the line ("\\.pdf\\'" . default)). However, when I open a file: link in org-mode, ever since I installed Okular, it uses that instead. Why is this happening and how can I fix it?

4

1 Answer 1

3

Presumably Okular has registered itself as the "default" somewhere; where and how depends on your desktop environment.

In any case, and assuming you don't wish to uninstall Okular, you can point Emacs to the PDF viewer of your choice by doing M-x customize-variable RET org-file-apps RET, then choosing "Command" as the value type for the cdr of the cons cell whose car is \.pdf\', and setting the value to the command you want to run (in this case evince). Or, if you set org-file-apps outside of Customize, just replace default with e.g. "evince", to run that command; see C-h v org-file-apps or M-x describe-variable RET org-file-apps RET for more details on how to set these values.

1
  • 2
    Thanks... The documentation in emacs for org-file-apps actually gives a few different examples of commands using evince, and I eventually figured out the one I needed was evince %s.
    – Brian Z
    Sep 12, 2013 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .