Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (10 sloc) 555 Bytes
(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match that used by the user's shell.
This is particularly useful under Mac OSX, where GUI apps are not started from a shell."
(let ((path-from-shell (string-rtrim (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))))
(when (and *is-a-mac* window-system)
(provide 'init-exec-path)
Jump to Line
Something went wrong with that request. Please try again.