Step 1: close Emacs completely and start it up again. This will fix the problem if it was caused by you inadvertently changing some setting/variable.
Step 2: if that didn't work:
comment out everything in your .emacs except for the line loading AUCTeX. In my case, the line is:
(load "auctex.el" nil t t)
The command
M-;
will comment-out everything in the active region. It will also uncomment everything in the region, if it is already commented, so you'll want to use that rather than manually adding a whole pile of ;;.
Following step 2, you should have an unmodified version of Emacs + AUCTeX, so you should have the correct behaviour back. This will confirm that the problem is something in your .emacs file conflicting with AUCTeX. If the problem persists, it may be a bug in AUCTeX, although that seems unlikely for such a commonly-used feature.
Step 3: Uncomment more of your .emacs, and restart. If the problem returns, it was caused by the now-uncommented code. If it doesn't, repeat the process until you find the code that triggers the problem.
Step 4: solve the problem yourself, or ask another question about the specific code that you discovered that caused the conflict.
The problem was being caused by invoking Emacs through the Gnome panel, which results in Emacs being oblivious of the PATH
as it is set through .bashrc
.
A way to fix this is to have Emacs set its PATH
to be the one seen by bash
, by putting the following in the .emacs
file (credit to Shane in here):
(setenv “PATH” (shell-command-to-string “bash -i -c ‘echo -n $PATH’”))
Best Answer
I use Emacs 23.4 on Mac OS 10.7. That's what I've done:
In this way, if I try to compile (hitting C-c C-c LaTeXnonint) a file like:
I get no interaction on the present error (
\latex
instead of\LaTeX
)P.S. the first three points of the list can be made using the shortcut showed by @Seamus