I have a docker container connected with a mounted volume containing an org file. The docker container has both texlive and emacs (configured exactly the way it is on my host) installed. I can open the org file and run
org-latex-preview on the math components without any problems.
I recently installed docker-tramp and figured I wouldn't need a separate installation of emacs in my docker containers. However, when I opened the same org file and ran
org-latex-preview I got the following message in the
*Org Preview LaTeX Output* buffer:
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=latex) restricted \write18 enabled. entering extended mode ! I can't find file `/tmp/orgtextfP6YZ.tex'. <*> /tmp/orgtextfP6YZ.tex (Press Enter to retry, or Control-D to exit) Please type another input file name ! Emergency stop. <*> /tmp/orgtextfP6YZ.tex No pages of output. Transcript written on /tmp//texput.log
orgtextfP6YZ.tex file is not in the docker container's
/tmp folder; however, it has been generated in the host's
/tmp folder. So the command that
org-latex-preview uses (
dvipng) accesses the host's
/tmp folder, which means that
dvipng was run on the host rather than the remote (docker container).
When I'm using a buffer I accessed through docker-tramp, any command I call using
M-! runs in the remote. So how do I configure it (or TRAMP in general) so that commands used indirectly (called by a function in emacs) are also run in the remote?