Skip to content

Instantly share code, notes, and snippets.

@aanoaa
Created November 24, 2011 05:40
Show Gist options
  • Save aanoaa/1390705 to your computer and use it in GitHub Desktop.
Save aanoaa/1390705 to your computer and use it in GitHub Desktop.
;; env for GUI
(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 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