Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
Which desktop environment are you using? Cinnamon? Mate? Gnome? –  terdon Sep 12 '13 at 16:26
    
Cinnamon. Problem solved but I still wonder what "default" got hijacked by Okular. Emacs documentation says the following about the default setting, but it's completely over my head: Use the default application for this file type, which is the association for t in the list, most likely in the system-specific part. This can be used to overrule an unwanted setting in the system-specific variable. –  Brian Z Sep 12 '13 at 20:37
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
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 '13 at 20:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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