Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Set your emacs path from your shell's $PATH
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(if 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