I am on Ubuntu. I'm trying to run the latex
command to run in the Emacs shell. I have done some research, and have already done the following:
I noticed that running env
in the Emacs shell gave a different value for PATH than running env
in the normal terminal. I installed purcell's exec-path-from-shell
to solve this. Following the directions, I copied my current terminal PATH
, went to .profile
, commented out lines of the kind PATH = something_new:PATH
and just replaced it all with PATH=my_whole_copied_path
. I then added (exec-path-from-shell-initialize)
just after (package-initialize)
in my .emacs
.
After doing this, running env
in Emacs shell gives the same PATH
as running env
in my terminal. The latex binary lives in /opt/texbin
, and my current Emacs PATH
reads:
'PATH=/opt/texbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin'
Still, running latex give command not found
. What am I missing?
Update: I have learned that /opt/texbin
is actually a symlink to a different location, and I've noticed that I can't cd
into it in the Emacs shell. Could this be why this isn't working? Can I get shell to understand symlinks with an option?