Set path/exec-path to shell path
For .dir-locals.el to find the custom programs
This commit is contained in:
parent
12b33b1f49
commit
832bc40d81
1 changed files with 13 additions and 0 deletions
|
|
@ -622,3 +622,16 @@ https://github.com/remyferre/comment-dwim-2
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
#+END_SRC
|
#+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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue