Sometimes, after havin applied latex to my .tex file, instead of executing

okular --unique my.pdf

emacs tried to execute

okular --unique my.pdf#src:332#("/folderToMyTex/my.tex" 0 61 (org-attr nil))

and the pdf is not opened. What is the reason for this and how to prevent it?

2 Answers 2


The default configuration for Okular looks like:

("Okular" ("okular --unique %o" (mode-io-correlate "#src:%n%a")) "okular")

What it's trying to do for you is to open the pdf at the location corresponding to your current point in the tex file.

If you wanted Emacs to simply execute okular --unique my.pdf, and only care to use Okular, then doing something like:

(setq TeX-view-program-list '("okular" "okular --unique %o"))

should work as a better workaround, but doesn't solve the root problem of the %a not expanding appropriately.


It seems to be a bug. When opening a teX-file from within an org-file, the command C-c-v, to open the corresponding pdf, does not work. Closing the teX-file which was opened from within the org-file and re-opening it from dired allows to open the pdf file as usual.

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.