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)))
.styfiles, it makes sense that it is a list that may be expanded – Arch Stanton Sep 05 '17 at 14:05TeX-auto-privateshould also be a list, so I'll update the answer... – phils Sep 05 '17 at 22:23pushand I get an error:concat: Symbol's value as variable is void: TeX-macro-private[edit]: that's the error I got by evaluating the code inEmacs -Q. If I put the code in myinit.elI getSymbol's value as variable is void: TeX-auto-private– Arch Stanton Sep 06 '17 at 08:37(with-eval-after-load "latex" ...)it doesn't give errors, but it does not load the auxiliary files, too. – Arch Stanton Sep 06 '17 at 09:21TeX-auto-privatecontains the path AUCTeX searches for auxiliary files that, basically, I use for the autocompletion of my LaTeX macros. When I setTeX-auto-privatewithin(with-eval-after-load ...),C-h v TeX-auto-privateshows that the variable contains the right path, but in practice I doesn't autocomplete my commands. Anyhow, I appreciated your help. With your solution AUCTeX works just right, even if it isn't optimal, perhaps. – Arch Stanton Sep 06 '17 at 10:53"tex"(being the specific library which defines those vars) rather than"latex". You could alternatively try forcibly loading the libraries withrequirebefore setting those variables, instead of using the deferred configuration (the latter would usually be preferable, but I don't know what the other issue is caused by, so this would be worth testing at least). – phils Sep 06 '17 at 11:52TeX-style-path, see AUCTeX isn't loading local per-package style files, is ignoringTeX-auto-local– Arch Stanton Sep 06 '17 at 13:07