when I do C-h v
and look up exec-path
, I get the following:
("/usr/local/bin"
"/usr/bin"
"/bin"
"/usr/local/games"
"/usr/games"
"/usr/lib/emacs/27.1/x86_64-linux-gnu"
"/usr/local/cuda/bin")
However, when I try to run nvcc
from M-x compile
, it says "nvcc not found". If I give it the full path /usr/local/cuda/bin/nvcc
, it works fine.
I thought having the path in exec-path
is supposed to let me use nvcc
, why is it not? Also, when I do M-! echo "$PATH"
, it prints
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
which is missing the last two elements of exec-path
from above. Though I guess that's because exec-path
takes precedence, so whatever. But in that case, why isn't the last element of exec-path
"taking effect" in my case?
Note that when I go into an ordinary terminal (outside emacs) and do echo "$PATH"
, I get the following:
/usr/local/cuda-11.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
though it's less surprising that emacs didn't capture that path which was from .bashrc
.