4

When I follow subham soni's instructions to connect emacs with Okular, I get the error message "Symbol's function definition is void: nil" when emacs tries to call the viewer "Command: (default View)" Any idea why this happens ?

My complete .emacs file is the following:

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.  
 '(TeX-source-correlate-method (quote synctex))
 '(TeX-source-correlate-mode t)
 '(TeX-source-correlate-start-server t)
 '(TeX-view-program-list (quote (("Okular" ("okular %o") "okular --unique %o#src:%n%b"))))
 '(TeX-view-program-selection (quote (((output-dvi has-no-display-manager) "dvi2tty") ((output-dvi style-pstricks) "dvips and gv") (output-pdf "Okular") (output-dvi "xdvi") (output-pdf "Evince") (output-html "xdg-open"))))
 '(delete-selection-mode nil)
 '(mark-even-if-inactive t)
 '(scroll-bar-mode (quote right))
 '(transient-mark-mode 1))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )
5
  • Please, post the content of your init file, at least the part relative to the setting of TeX-view-program-selection.
    – giordano
    Feb 3, 2016 at 10:14
  • which file exactly do I have to post and where should it be located ? Feb 3, 2016 at 10:15
  • @giordano I uploaded the entire .emacs file Feb 3, 2016 at 10:41
  • Six years later @giordano s comment still leads to the correct solution: Choose okular by customizing TeX-view-programm-selection.
    – Keks Dose
    May 9, 2022 at 20:03

1 Answer 1

6

Remove the line

'(TeX-view-program-list (quote (("Okular" ("okular %o") "okular --unique %o#src:%n%b"))))

It has a wrong format and anyway is useless if you use a recent AUCTeX version (11.88 or above), Okular is correctly configured out-of-the-box.

2
  • Thank you, now it works. Though I don't understand why it was wrong. I followed the guide from the link.. Feb 3, 2016 at 11:00
  • If it answers your question please mark it as accepted. You added the line okular --unique %o#src:%n%b to the One executable field, not the Command one as indicated by subham soni. Anyway, there is no need to change Okular setting nowadays.
    – giordano
    Feb 3, 2016 at 11:04

You must log in to answer this question.

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