Closed failable closed 3 years ago
I use exec-path-for-shell
to set up the global environment. I would guess it would work for you based on the info above. I think modifying the global environment is out of scope for envrc.el
.
That makes sense. Thank you!
Note really an issue.
I like the default Emacs environment way as stated in the Design Notes.
I use
asdf-direnv
andenvrc
for managing my environment. I have a default.envrc
in my$HOME
to manage the global tool versions. When I start Emacs in non terminal way (double click the App in macOS), that global.envrc
is not being taken care byenvrc
(of course). I'd like to achieve that when I start Emacs outside a shell, it takes care of that default global environment in$HOME
. Maybe I can solve this by usingexec-path-from-shell
, is there anenvrc
way to solve this (=select a default environment for Emacs when starting in GUI) ? Thanks!I also tried these two ways:
/usr/local/opt/emacs-mac/Emacs.app/Contents/MacOS/Emacs
to start the GUI Emacs in my terminal, this way works the same as running a non GUI version of Emacs.envrc
works perfectly but I have to keep a foreground shell command./usr/local/opt/emacs-mac/Emacs.app/Contents/MacOS/Emacs &
in my terminal, this way has an issue that the background process is run in a subshell by bash and my.profile
is sourced again. Since myasdf
anddirenv
setup is put in.bashrc
(which is not sourced when the background process is launched), lots ofPATH
will be inserted before thePATH
of parent shell and the default Emacs environment will get duplicate and unexpectedPATH
.