purcell / exec-path-from-shell

Make Emacs use the $PATH set up by the user's shell
Other
1.41k stars 81 forks source link

What does it do? #98

Closed AtomicNess123 closed 4 years ago

AtomicNess123 commented 4 years ago

I still am confused about the function of this package. Does it only tell you if your path variables are not correctly set in emacs or does it correct them for you?

purcell commented 4 years ago

This library solves this problem by copying important environment variables from the user's shell: it works by asking your shell to print out the variables of interest, then copying them into the Emacs environment.

Does this part of the README not make it clear?

AtomicNess123 commented 4 years ago

Ok, but I moved the variables, as suggested by the package in its warning message, to .zhsenv and several packages stopped working. I moved them back to .zshrc and all works, but I get the warning message that I should move them outside from .zshenv. I don't know what to do.

purcell commented 4 years ago

It can be a little fiddly to set those things up correctly. Thanks for letting me know you have found this confusing. I am considering changing the way this stuff works, so that exec-path-from-shell complains less, but still lets the user know that their startup files could be reorganised to be more efficient. In the meantime, feel free to leave your startup files as-is and set exec-path-from-shell-check-startup-files to nil to disable these warnings.

AtomicNess123 commented 4 years ago

Thank you!