Created
May 26, 2014 20:34
-
-
Save wfaler/803783432c8046321c6c to your computer and use it in GitHub Desktop.
Get PATH variables to graphical emacs in OS X
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun set-exec-path-from-shell-PATH () | |
(let ((path-from-shell (replace-regexp-in-string | |
"[ \t\n]*$" | |
"" | |
(shell-command-to-string "$SHELL --login -i -c 'echo $PATH'")))) | |
(setenv "PATH" path-from-shell) | |
(setq eshell-path-env path-from-shell) ; for eshell users | |
(setq exec-path (split-string path-from-shell path-separator)))) | |
(when window-system (set-exec-path-from-shell-PATH)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment