Hi Matt, 2016-04-15 20:39 GMT+02:00 Matthew Leach <matt...@mattleach.net>: > Hi Mosè, > > Mosè Giordano <m...@gnu.org> writes: > >> On third thought, it's pretty tricky to locally change the value of >> `TeX-command-extra-options' once it's set. The only simple way I >> found is to manually edit the auto saved file and then revert the *TeX >> buffer, not the best option indeed. > > I agree - this doesn't seem like an ideal fix. One possible solution > that I've thought about that seems more intuitive is to include a new > line in the footer of TeX-master files for variables that should be set > document-wide. > > For example, when I create a new TeX file I have: > > --8<---------------cut here---------------start------------->8--- > %%% Local Variables: > %%% mode: latex > %%% TeX-master: t > %%% End: > --8<---------------cut here---------------end--------------->8--- > > What about if we add a new category called 'Document Variables': > > --8<---------------cut here---------------start------------->8--- > %%% Local Variables: > %%% Document Variables: > %%% mode: latex > %%% TeX-master: t > %%% End: > --8<---------------cut here---------------end--------------->8--- > > and all variables that are set here would be set locally on any TeX file > that has this file listed as the TeX-master? Setting 'Document > Variables' where TeX-master is not `t' would be silently ignored. > > Do you think that could work?
I was rather thinking about a new alist `TeX-document-variables' to be stored in the auto saved file, with the name of a variable as key and its value as value. This should be used only for certain variables, above all (or only) those related to TeXing options (engine, extra options, `ConTeXt-Mark-version', etc). Every function that needs to access those variable should check this alist first fallbacking onto the (local) value of the variable if not present in `TeX-document-variables'. We can define a function similar to `TeX-process-get-variable' to get the value of the variable from the alist. Possible objection: why not using the value of the variable from buffer associated to `TeX-master-file', just like `TeX-process-get-variable'? Because then we would require to keep always the master file opened, I don't really like this option. Bye, Mosè _______________________________________________ auctex-devel mailing list auctex-devel@gnu.org https://lists.gnu.org/mailman/listinfo/auctex-devel