Ciao Mosè, thanks a lot for the quick reply. This indeed fixed the problem. And thanks also for the TeX-source-correlate-mode tip, this is much cleaner than adding the --synctex option.
Regards, Alfredo On Mon, Sep 25, 2017 at 2:59 PM, Mosè Giordano <m...@gnu.org> wrote: > Ciao Alfredo, > > 2017-09-25 14:50 GMT+02:00 Alfredo Buttari <alfredo.butt...@gmail.com>: > > Hi, > > I have a large .tex file with the following footer: > > > > %%% Local Variables: > > %%% mode: latex > > %%% TeX-master: t > > %%% TeX-engine: xetex > > %%% TeX-command-extra-options: "-shell-escape --enable-write18 > --synctex=1" > > %%% End: > > > > When I open it I am asked whether I want to accept the potentially unsafe > > value for the TeX-command-extra-options. In this message the potentially > > unsafe value corresponds to what I have in the footer, i.e., > "-shell-escape > > --enable-write18 --synctex=1". I hit yes and the file is opened. > However, if > > I ask emacs to describe variable TeX-command-extra-options (with C-h > C-v) I > > get this: > > > > TeX-command-extra-options is a variable defined in `tex.el'. > > Its value is "--synctex=1" > > Original value was "" > > Local in buffer hdr.tex; global value is "" > > > > Automatically becomes buffer-local when set. > > > > Documentation: > > String with the extra options to be given to the TeX processor. > > > > You can customize this variable. > > > > > > > > It seems that the value of this variable is overwritten once again in > some > > other place. Note that this does not happen if I create a simple file > > containing only (exactly the same footer): > > > > > > \documentclass{article} > > > > \begin{document} > > > > \end{document} > > > > %%% Local Variables: > > %%% mode: latex > > %%% TeX-master: t > > %%% TeX-engine: xetex > > %%% TeX-command-extra-options: "-shell-escape --enable-write18 > --synctex=1" > > %%% End: > > > > > > Could you please help me figure out what's happening? > > If you have it, try deleting the auto/hdr.el file, automatically > generated by AUCTeX when parsing the document. The value of > `TeX-command-extra-options' is stored there, in order to make it > available to all files part of the same document, but if you change > the value of that variable you can incur this nuisance. > > In addition, note that you can enable `TeX-source-correlate-mode' in > order to get forward/inverse search, without setting `--synctex=1' in > in `TeX-command-extra-options'. > > Bye, > Mosè > -- ----------------------------------------- Alfredo Buttari, PhD CNRS-IRIT 2 rue Camichel, 31071 Toulouse, France http://buttari.perso.enseeiht.fr
_______________________________________________ auctex mailing list auctex@gnu.org https://lists.gnu.org/mailman/listinfo/auctex