diff --git a/config_new.org b/config_new.org index 07ef738..e0d116c 100644 --- a/config_new.org +++ b/config_new.org @@ -622,3 +622,16 @@ https://github.com/remyferre/comment-dwim-2 ) ) #+END_SRC + +** Set path to shell path + +#+BEGIN_SRC emacs-lisp +(defun set-exec-path-from-shell-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)))) + +(set-exec-path-from-shell-PATH) +#+END_SRC