I updated my texlive to 2022 recently and found that the auto-compilation command in tex-mode running latexmk -pdf -pdflatex=xelatex --synctex=1 -interaction=nonstopmode -file-line-error file.tex
throws this error:
/bin/sh: latexmk: command not found
TeX Output exited abnormally with code 127 at Mon May 9 15:51:01
My attempted solutions:
- I am pretty sure the new path of texlive2022 was added to my
$PATH
, I also triedecho $PATH
in the built-in shell of Emacs, it also gives the correct path names. - I've tried the answer in Trying to run a linux program in Emacs: command not found, i.e., add the path to
~/.profile
, but it doesn't work as well. - I also checked out using
M-x getenv path
, and it does contain the path inside emacs.
PATH
to something different from the environment value? If yes, what did you change? – NickD May 10 '22 at 06:06