diff --git a/lisp/init-essential.el b/lisp/init-essential.el index 04c02b5ef..678a028a6 100644 --- a/lisp/init-essential.el +++ b/lisp/init-essential.el @@ -296,13 +296,12 @@ If OTHER-SOURCE is 2, get keyword from `kill-ring'." ;; package exec-path-from-shell uses some Linux only cli tool (my-run-with-idle-timer 2 (lambda () + (my-ensure 'exec-path-from-shell) (setq exec-path-from-shell-check-startup-files nil) - ;; @see https://github.com/purcell/exec-path-from-shell/issues/75 - (exec-path-from-shell-initialize) - ;; @see https://emacs.stackexchange.com/questions/17866/magit-how-to-use-systems-ssh-agent-and-dont-ask-for-password - (exec-path-from-shell-copy-env "SSH_AGENT_PID") - (exec-path-from-shell-copy-env "SSH_AUTH_SOCK") - (exec-path-from-shell-copy-env "GPG_AGENT_INFO")))) + (setq exec-path-from-shell-arguments nil) + (dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" "GPG_AGENT_INFO" "LANG" "LC_CTYPE" "NIX_SSL_CERT_FILE" "NIX_PATH")) + (add-to-list 'exec-path-from-shell-variables var)) + (exec-path-from-shell-initialize)))) ;; }}