Commits

Feng Zhou  committed c1630c9

Reverted set-exec-path-from-shell-PATH back to what it was before

  • Participants
  • Parent commits 1394ed5

Comments (0)

Files changed (1)

 ;; Set the exec-path of emacs equal to the shell's $PATH,
 ;; so that emacs knows the shell's $PATH
 (defun set-exec-path-from-shell-PATH ()
-  (let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
+  (let ((path-from-shell 
+	 (replace-regexp-in-string "[[:space:]\n]*$" "" 
+				   (shell-command-to-string "$SHELL -l -c 'echo $PATH'"))))
     (setenv "PATH" path-from-shell)
     (setq exec-path (split-string path-from-shell path-separator))))