Skip to content

Instantly share code, notes, and snippets.

@jakemcc
Created October 14, 2012 05:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakemcc/3887459 to your computer and use it in GitHub Desktop.
Save jakemcc/3887459 to your computer and use it in GitHub Desktop.
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