# Emacs (AUCTeX) not writing to vc.tex file when using VC bundle in LaTeX document [closed]

I'm using GNU Emacs 24.1 for Mac OS X on Lion with the latest version of AUCTeX and the VC bundle to print version information in a footer on my LaTeX documents. The problem is that when I typeset my LaTeX document, it runs the suggested shell command through \immediate\write18{./vc} just fine, but it's not writing anything to the vc.tex file when the vc script is run. I've checked the log file every time, and the following line always appears:

runsystem(./vc)...executed safely (allowed).

I've spent the better part of a day trying to figure out why the vc.tex file is not being revised, and I've narrowed it down to a problem with Emacs/AUCTeX because TeXShop seems to be doing it just fine. Alternatively, I can always run the vc script in Terminal, but I'd like to figure out why the \immediate\write{./vc} line isn't working in Emacs.

Any ideas??

-

## closed as too localized by lockstep, Qrrbrbirlbel, Kurt, mafp, Stefan Kottwitz♦Apr 11 '13 at 20:57

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Did you check that the -shell-escape option is used when running from emacs. You can see at the beginning of the .log file which command has been invoked. – TeXtnik Aug 7 '12 at 9:42
I did check for the -shell-escape option. For the moment, I think I've figured it out. It seems that Emacs wasn't seeing my gawk executable file (in usr/local/bin), which it needs to run vc properly, and so nothing was being written to the vc.tex file. This was fixed by pointing Emacs to the gawk file through pandoc: (setenv "PATH" (concat "/usr/local/bin:" (getenv "PATH"))) (load "pandoc-mode") (add-hook 'markdown-mode-hook 'turn-on-pandoc) (add-hook 'pandoc-mode-hook 'pandoc-load-default-settings) – ajp11 Aug 8 '12 at 15:00
At first I thought it was a problem with Auctex and I was trying to adjust the Tex-Command-List through customization, but apparently not. – ajp11 Aug 8 '12 at 15:01