Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

My version of Emacs and AUCTeX[1] uses

TeX-evince-sync-view

for viewing pdf.

This command is not working for some reason. Evince is launched but Emacs freezes and I have an error

Couldn't find the Evince instance for file XXX

I don't have the time to debug it and, moreover, I don't need the sync feature.

So, I'm trying to view pdf in a old-fashioned (simple) way (without sync). I tried this code (which used to work several years ago):

(setq TeX-view-program-list '(("Evince" "evince --page-index=%(outpage) %o")))
(setq TeX-view-program-selection '((output-pdf "Evince")))

But there is no change in Emacs. (I still have the problematic command

TeX-evince-sync-view

as default command.)

I tried to do the same but with the graphical interface (Tools>customize AUCTeX>Tex Command>TeX view>Tex-view-program-selection selecting "just" Evince) but no change.

How can I set Evince without sync as the default command for viewing pdf?

[1]Emacs 23.4.1 and AUCTeX 11.85-1 but I have the same problem with emacs-snapshot 24.3.50.1.

share|improve this question
2  
Does it help if you change ("Evince" "evince --page-index=%(outpage) %o") to just ("Evince" "evince %o")? –  N.N. Apr 5 '13 at 12:02
    
this is not an answer to your question, but could you try a newer emacs? <a>gnu.org/software/emacs/#Obtaining</a>; and install auctex from a repository instead? i've tested both 24.2 and 24.3 and have had no problems. –  user28659 Apr 8 '13 at 7:56
    
I have already a very up-to-date version of Emacs (24.3.50.1) (thanks to Julien Danjou and his "emacs-snapshot" Debian package (emacs.naquadah.org)) and the last version (11.87) of auctex. What works for you? Did you successfuly change the viewing command in pdf mode? –  ppr Apr 8 '13 at 14:24
1  
Did you try to use emacs -q and then evaluate the suggested configuration in *scratch*? Using emacs -q is a way to see if the local configuration is the reason for the problem as it disables .emacs. –  N.N. Apr 8 '13 at 17:16
1  

2 Answers 2

up vote 5 down vote accepted

Solution: to use `TeX-view-program-list' in order to define a new viewer description (which contains an Evince command without sync). This new command will override the description of Evince defined in `TeX-view-program-list-builtin' (which contains the problematic command TeX-evince-sync-view).

To do so :

M-x customize-variable <RET> TeX-view-program-list <RET> <INS> Name = Evince Command evince --page-index=%(outpage)

I have no idea why this code in .emacs does not work:

(setq TeX-view-program-list '(("Evince" "evince --page-index=%(outpage) %o")))
share|improve this answer

Via configuration, I find the following works:

(defun my-LaTeX-mode()
  (add-to-list 'TeX-view-program-list '("Evince" "evince --page-index=%(outpage) %o"))
  (setq TeX-view-program-selection '((output-pdf "Evince")))
  ; Other mode specific config
  )
(add-hook 'LaTeX-mode-hook 'my-LaTeX-mode)
share|improve this answer

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.