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.

tom4everitt
  • 173
  • 4
  • 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 08: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 00: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 08: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 09:41
  • When you open a LaTeX file, which menu do you see in your toolbar? If you're using AUCTeX you should have, among other, `LaTeX` and `Command` (and last entry under `LaTeX` is `Report AUCTeX bug`, if you move pointer over this you'll see the tooltip `Problems with AUCTeX ? Mail us!`); instead with Emacs default latex mode you'll have `TeX` and `Text` menus. – giordano Sep 15 '15 at 11:05
  • 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 01:43
  • I think most everyone who have used AUCTeX, or tried to use it, have experienced problems differentiating the built-in modes that have almost identical names. – lawlist Sep 16 '15 at 01:51

0 Answers0