2

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.

7
  • 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
    Commented Sep 12, 2015 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. Commented Sep 14, 2015 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
    Commented Sep 14, 2015 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). Commented Sep 15, 2015 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. Commented Sep 16, 2015 at 1:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.