1

I'm using Emacs 24.3.1 on Ubuntu 14.04 with AUCTex for LaTeX editing. The command C-c C-c allows me to easily compile the document with pdflatex. However, the second time I'm running C-c C-c, instead doc-view is launched (showing the resulting pdf).

This doesn't fit with my workflow. I use a different pdf viewer, and sometimes need to compile the document twice to get citations right etc.

Can I disable doc-view so that C-c C-c always executes pdflatex?

I've tried the solutions suggested here How to disable DocView as default command in AUCTeX? but had no effect.

This solution didn't work either how to modify default command for TeX-command-master (ie, C-c C-c)? since I don't seem to have a TeX-command-master command installed (not available on M-x). C-c must be mapped to something else.

EDIT (Solved): It turns out my problem was caused by me using Emacs latex mode rather than AUCTeX. After making sure AUCTeX is installed, it's invoked with LaTeX-mode, in contrast to Emacs latex mode that is invoked with latex-mode. The answer here how to modify default command for TeX-command-master (ie, C-c C-c)? now solves my problem.

  • Check the value of TeX-view-program-selection variable. Note opening doc-view isn't the default behavior, you somehow changed it in your init file. – giordano Sep 12 '15 at 8:46
  • That variable is not set for me. Also, I'm pretty sure I haven't changed the behaviour of C-c in anyway. – tom4everitt Sep 14 '15 at 0:31
  • You have to evaluate it in a LaTeX buffer, it must have a value. Which version of AUCTeX are you running? Check the value of AUCTeX-version too (always in a LaTeX buffer). – giordano Sep 14 '15 at 8:58
  • I use the describe-variable, but there's no AUCTeX-version variable (I invoke the mode with LaTeX-mode, not actually positive it's AUCTeX at all). – tom4everitt Sep 15 '15 at 9:41
  • 1
    I am an idiot :) I only thought I was using AUCTeX, when I was actually using Emacs Latex mode. Generally, the way to tell seem to be that Emacs Latex mode is invoked with latex-mode, whereas AUCTeX is invoked with LaTeX-mode. Thanks for your help, the missing variables is what got me suspicious. – tom4everitt Sep 16 '15 at 1:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.