Closed computersarecool closed 7 years ago
ansi-term
has nothing to do with this package, in this case.
Look to see how ansi-term
starts your shell: command-line arguments passed to the shell (e.g. -i
, -l
) will generally determine whether your .profile
and other startup files are read. Read the man
page for bash, for example.
My understanding is that ansi-term
inherits the shell from emacs, so when exec-path-from-shell
sets certain environment variables for emacs, those too are set in ansi-term
. Is it not possible to get exec-path-from-shell
to make the emacs environment variables identical to those of a shell (i.e. with all environment variables set)?
Nope. It's actually not practical to make a shell tell you just the names of all its active environment variables. You'd think it would be possible to just run env
and parse its output, but values can contain newlines and the =
character, so you can imagine all the things that can go wrong. :-)
But you can add more variables to exec-path-from-shell-variables
, and you'll get the behaviour you want.
Ah, that is what I was looking for. Thank you.
Hi, This package has helped out a lot. I use
ansi-term
as a terminal inside of emacs on Ubuntu and prior to using this package that shell was almost unusable. However, as helpful as this package is, it still seems like a few variables that I wish were set are not set.I notice in your README you say:
but I wonder why you don't just copy all of the environment variables. When I open a new instance of
ansi-term
my.profile
is not read, so the environment variables that are there (where I set most of them) are not configured.Specifically I am missing:
and my
PATH
is missing several directories. Is there a reason you do not extract all environment variables / is there a good way to do so?