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

Shell variables other than 'path' are not copied even though the exec-path-from-shell-variables contains them #72

Closed parhamdoustdar closed 7 years ago

parhamdoustdar commented 7 years ago

I have modified the exec-path-from-shell-variables variable to contain two other variables, GOROOT and GOPATH. Here is what I get when I describe the variable:

exec-path-from-shell-variables is a variable defined in ‘exec-path-from-shell.el’.
Its value is ("PATH" "MANPATH" "GOPATH" "GOROOT")
Original value was ("PATH" "MANPATH")

However, when I run M-x getenv RET GOPATH RET and the same with GOROOT, they are not set.

What am I doing wrong?

Thanks a lot for the awesome library! <3

purcell commented 7 years ago

Hi! How did you set that variable? Did you call exec-from-path-initialize after setting it? Customising the variable is not enough to ensure this happens.

parhamdoustdar commented 7 years ago

Hi, Ah, alright. I didn’t know that. I manually set the variable just before calling exec-path-from-shell-initialize and now it works! Thanks a lot for the quick help! <#

On Sep 2, 2017, at 12:54 AM, Steve Purcell notifications@github.com wrote:

Hi! How did you set that variable? Did you call exec-from-path-initialize after setting it? Customising the variable is not enough to ensure this happens.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/purcell/exec-path-from-shell/issues/72#issuecomment-326700135, or mute the thread https://github.com/notifications/unsubscribe-auth/AAVhGyaRVkZM8DIVWDvr2KSxGKW-qPPSks5seIsugaJpZM4PKIj0.

purcell commented 7 years ago

Cool, happy to help.