purcell / exec-path-from-shell

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

exec-path paths order reversed #15

Closed ghost closed 10 years ago

ghost commented 10 years ago

I might be missing the point, but couldn't find a solution looking through reported issues.

I'm trying to get pyenv to work transparently in emacs, but it looks like the path order gets reversed when using exec-path-from shell.

In the terminal I will have:

$ echo $PATH
/usr/local/opt/pyenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

While when using exec-path-from-shell-initialize, exec-path becomes

("/usr/local/bin/" "/usr/bin/" "/bin/" "/usr/sbin/" "/sbin/" "/usr/local/opt/pyenv/shims/" "/usr/local/Cellar/emacs/24.3/libexec/emacs/24.\
3/x86_64-apple-darwin13.2.0/")

To compare, I evaluated exec-path in non GUI emacs, which shows the the PATH was imported as is:

("/usr/local/opt/pyenv/shims" "/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/usr/local/Cellar/emacs/24.3/libexec/emacs/24.3/x86_\
64-apple-darwin13.2.0")

In GUI emacs, when I run execp-path-from-shell-initialize and eval exec-path manually, PATH seems to be setup correctly as well...

purcell commented 10 years ago

That's unusual! I get the same order as in my shell.

What shell do you have? And on what platform?

ghost commented 10 years ago

I've just doube checked. I'm using use-package/req-package in my init.el and I run exec-path-from-shell from the :init section. When I run it from :config everything seem to work correctly. I guess it has nothing to do with exec-path-from-shell than. Sorry for the confusion.

purcell commented 10 years ago

Ah, interesting. I wonder why that would reverse the exec-path...

ghost commented 10 years ago

So do I, but I'm not sure I fully understand the load/defered load concepts of execution using use-package...

PS

it's plain BASH on OS X 10.9.3

purcell commented 10 years ago

Well, leave a message here if you figure out what was going wrong. :-)

ghost commented 10 years ago

@purcell I will !

soylent commented 9 years ago

Looks like an issue with path_helper on OS X