I have
(setq TeX-auto-local "subdir")
(setq TeX-macro-private '("dir/"))
I want to set TeX-auto-private
to dir/subdir
by joining TeX-auto-local
and TeX-macro-private
together. I thought it was easy but I can't find a way.
I have
(setq TeX-auto-local "subdir")
(setq TeX-macro-private '("dir/"))
I want to set TeX-auto-private
to dir/subdir
by joining TeX-auto-local
and TeX-macro-private
together. I thought it was easy but I can't find a way.
For the stated examples, simply concatenating the two strings can be done like so:
(setq TeX-auto-private (concat (car TeX-macro-private)
TeX-auto-local))
=> "dir/subdir"
However it looks to me as if TeX-auto-private
also needs to be a list, rather than a string?
TeX-auto-private is a variable defined in ‘tex.el’.
Its value is ("/tmp/emacs-sandbox.ollfrTriav/HOME/.emacs.d/auctex/auto")
Documentation:
List of directories containing automatically generated AUCTeX style files.
These correspond to the personal TeX macros.
So perhaps you actually want this?
(push (concat (car TeX-macro-private) TeX-auto-local)
TeX-auto-private)
Or, if you wish to clobber any existing list elements:
(setq TeX-auto-private (list (concat (car TeX-macro-private)
TeX-auto-local)))