A local variable keeps coming back, and I know not whence. In a certain buffer, TeX-command-extra-options is "--synctex=1", even after I have removed this from my init.el and restarted Emacs. I tried setting it to something else by adding

%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% TeX-command-extra-options: "--output-directory=out/"
%%% End:

to the end of the file. But, if I save and revert, the old value persists. If I setq the variable manually, and revert the file, the old value comes back. This doesn't happen with emacs -Q, but I was hoping someone might know what is going on. I suspect that AUCTeX is somehow responsible.

Alternative question: how might I debug this? It seems to me that, when I revert, the variable is first set according to my specification, and then reset by something or other.

  • Is TeX-command-extra-options a user option? If so, have you customized it, so it gets set automatically in your init file or your custom-file? – Drew May 21 '19 at 15:45
  • @Drew, no, I don't load the custom-file. – Toothrot May 21 '19 at 16:00
  • OK, for some reason there is a directory called auto/ containing code that is run automatically. – Toothrot May 21 '19 at 17:34
  • Glad you found the problem. You can accept your own answer. (An accepted answer improves the usefulness to others of a Q & A.) – Drew May 21 '19 at 18:39

In case someone else runs into this, I had enabled TeX-auto-save, which saves settings to an auto/ directory and loads them when a file is revisited.


|improve this answer|||||

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.