Tassilo Horn <[email protected]> writes:
> Leo Butler <[email protected]> writes:
>
>> I have been using:
>>
>> %%% Local Variables:
>> %%% mode: latex
>> %%% eval: (setenv "TEXINPUTS" ".:..:../resources:../../resources:")
>> %%% TeX-master: t
>> %%% End:
>>
>> but this changes TEXINPUTS for every invocation of (pdf)latex.
>
> Would this slightly longish snippet work as you want in eval: ?
>
> (progn
> (defvar-local leo/texinputs-set nil)
> (unless leo/texinputs-set
> (setenv "TEXINPUTS" ".:..:../resources:../../resources:")
> (setq-local leo/texinputs-set t)))
Another longish approach would be to set `process-environment', maybe
something like this in eval:
(let ((process-environment process-environment))
(add-to-list 'process-environment
"TEXINPUTS=.:..:../resources:../../resources:"))
But I think this is a kludge anyway. It is probably easier not to mess
with environment variables within Emacs and make it all happen outside
Emacs. Maybe a symlink to the relevant directory below $TEXMFHOME?
Best, Arash