[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TEXINPUTS as a local variable

From: Arash Esbati
Subject: Re: TEXINPUTS as a local variable
Date: Tue, 04 Jan 2022 12:44:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50

Tassilo Horn <> writes:

> Leo Butler <> 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

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]