[Tex/LaTex] AUCTeX View and Compile commands in Emacs 24.4

auctexemacsviewers

With Emacs 24.3 on Mac OS X, I have used the method described in the answer by CodeKingPlusPlus at
Emacs AUCTeX View command
to use C-c C-v to open compiled latex PDFs using Preview.app.

After switching to Emacs 24.4 (but using the same AUCTeX version and .emacs file) it is not working anymore. For C-c C-v now I get the error "No appropriate .dvi file could be found". I thought maybe I need to do M-x customize-variable again to set the variable TeX-command-list, but this variable doesn't exists anymore.

C-c C-v is bound to the command tex-view, which, by definition attempts to open a .dvi file. The command invoked seems to be described by the variable tex-dvi-view-command, but changing that to open -a Preview *.pdf or something similar doesn't help anything. So this may be only for .dvi files, but I don't see any other command for .pdfs.

C-c C-c is also working strangely. In 24.3 it offered a command (usually Compile or View) depending on whether the .tex file needed compilation. Now it always offers \doc-view, and any time I want to compile, I need to enter pd+Space+Enter to run pdflatex.

Any help with getting Preview to open and making compiling easier would be much appreciated.

Best Answer

Having just made the same update to Emacs 24.4, I had similar symptoms. The view prompts are coming from the built in tex mode, not AuCTeX. Looking at the loading messages, there is a report that tex-site could not be found.

The solution for me was to remove auctex and reinstall it. I had auctex installed via the package system and used that for these operations. After this, restarting emacs and loading a tex file now loads AuCTeX (most visible by the presence of a Command menu) and viewing and compiling now work as they should.

Related Question