Is it possible to set environment variables and access them immediately without reloading the Emacs configuration (like using the load-file function)?
For instance, when I evaluate this code to set the PATH variable:(let ((paths '("/some/path" "/some/path/2")))
;; (setq exec-path (append paths exec-path))
(setenv "PATH" (concat (string-join paths ":")
":"
(getenv "PATH"))))
And then try to launch eshell in the current Emacs session, I find that the new values aren't appended. The only way to set them is to put the code into a config file and reload it through (load-file "~/.emacs.d/init.el").