From 832bc40d8141f23bc8d0a607795690d2410f5377 Mon Sep 17 00:00:00 2001 From: Laurens Miers Date: Sat, 14 Sep 2024 08:37:47 +0200 Subject: [PATCH] Set path/exec-path to shell path For .dir-locals.el to find the custom programs --- config_new.org | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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