Hi, I have posted the persistant problem three weeks ago already to
https://emacs.stackexchange.com/questions/72860/auctex-in-wsl-cannot-find-tex-live-in-win,
but nobody seems to know the answer. I suspect the solution may be pretty
straightforward, but I'm just a emacs+ auctex beginner, so please bear with me
if this appears banal. For convenience, here again what I have tried so far.
Thank you and best regards @all. AUCTex in WSL cannot find TeX Live in
Win
When trying to compile/ pdf-preview a tex-file, minibuffer spits out:
ERROR: AUCTeX cannot find a working TeX distribution. Make sure you have one
and that TeX binaries are in PATH environment variable
Setup:
* AUCTex (up-to-date version from ELPA) via:
Win 10 --> wsl (1) --> Debian 11 (+ VcXsrv for GUI) --> Emacs (from the
official 'bullseye'-repository)
* c:/texlive/2022/bin/win32/ (full install)
Paths for TeX Live and Ghostscript in the Windows environment-variables are
correctly set: working fine in Emacs under Win 10 and also Cygwin.
Is there anything else I would have to do for AUCTex to find TeX Live under
Windows?
By all means I would like to avoid a second 7GB-install of TeX Live in WSL.
Update:
When in the WSL Linux-console I type: pdflatex.exe, it says: "This is pdfTeX,
Version 3.141592653-2.6-1.40.24 (TeX Live 2022) (preloaded format=pdflatex)
restricted \write18 enabled."
It can therefore be safely assumed that WSL1 does read the path correctly? Why
then can not Emacs-AucteX find it. May "restricted" have anything to do with
it? Or that it says "pdfTeX", instead of pdfLateX? After another several days
of digging in the dark, I am on the brink of giving up.
Update 2:
* I created a helloworld.tex-file in wsl-emacs: no compiling, just
saved it to the default folder.
* I quit wsl-emacs and in wsl-debian console typed: pdflatex.exe
helloworld.tex
* This actually created the according helloworld.pdf.
So the wsl/ windows-texlive connection is definitely alive and working.
Therefore I'm still wondering: Why is this not possible in wsl-emacs, why can
auctex not find texlive?
Another observation, if relevant: If 1) in wsl-emacs I create the
helloworld.tex and not just save it, but also, unsuccesfully, try to compile
('latex' or 'pdflatex') it 2) exit emacs and in wsl-debian console type
pdflatex.exe helloworld.tex 3) it now denies permission:
c:/texlive/2022/texmf-dist/tex/latex/l3backend/l3backend-pdftex.def)pdflatex.exe:
helloworld.aux: Permission denied
Update 3:
After a good sleep, the probable solution to the problem seems, to me at least,
so obvious that I'm surprised am the first to come up with it... ;)
When I tell auctex in wsl-emacs to compile/ 'pdflatex' helloworld.tex, it by
default tries to do this within _wsl_. So it is bound to complain, as there is
no TexLive in wsl.
The right and as we've seen above working command to compile/ 'pdflatex' the
file in TexLive _Windows_ is pdflatex._EXE_.
So it seems all I would have to do is tell auctex to execute pdflatex.exe,
instead of just pdflatex.
Does this make any sense? If so: now how/ where in auctex can I change the
default command accordingly?
Thanks!
Update 4: Still no success.
Nobody knows? In the auctex-command settings I've tried by changing command
'pdflatex' to 'pdflatex.exe', but auctex still can not find TexLive.
Maybe I have to give and/ or mount the full Windows TexLive somehow, somewhere?
-------------------------------------------------------------------------------------------------
FreeMail powered by mail.de - MEHR SICHERHEIT, SERIOSITÄT UND KOMFORT