Good Morning! Hope everyone is doing grand!
☕
Next :clojureD 2021 talk now online: https://www.youtube.com/watch?v=A0TafHXszgM
maaning
morning
Meeting up with all of my actual colleagues for an actual social get-together tomorrow. Kinda weird after all of this time!
Morning!
Hell-o
Morning!
Morning
Morning
Morning
Morning !
Morning!
morning
Hey folks, I’m having and interesting issue - can’t load env. variables into the repl started in Emacs, on the other hand Clojure repl started in terminal loads all variables. Any ideas? Mac OS Emacs 27.2 ZSH
Yeah and also if I provide a var alias in exec-path-from-shell-copy-env
then Emacs GUI loads the variable, but the project has dozens of such vars, and I wonder why the library doesn’t automatically load login shell env-vars.
Presumably macOS doesn't make those available to applications. Doesn't exec-path-from-shell start a shell process to get them?
If I had a lot of variables, specific to one project, I would put exports for them in .envrc in the project directory, run direnv allow
in there in a shell, then use envrc
Surprisingly enough I encountered the same issue in Emacs GUI in Manjaro Linux machine :thinking_face: I thought MacOS/M1 was to blame
Yeah, me too, but that’s how the client has it done across all projects.
Regarding shell process - not sure, is there a way to check?
On Linux, I think it depends on where you set them. Possibly /.profile is sourced when Xorg starts, but not /.bashrc (or the latter might exit early when not being used in an interactive shell).
Use the source, Luke 😁
@djm_uk Thanks! it turns out zsh keeps env variables in .zshenv
and Emacs GUI managed to eventually source those vars.
@chokheli how did you fix it in the end?
@otfrom added vars to .zshenv
🆒
thx
Cheers!
Is Emacs started from the Shell or as a standalone application?
I just have (setenv "FOO" "bar")
in my emacs config on macOS. I think there is another way to do it on macOS, but I forget what it is
https://superuser.com/questions/1609942/how-to-set-environment-variables-on-macos-using-a-gui
@javahippie Standalone app
This might help https://github.com/purcell/exec-path-from-shell
This plus direnv
also seems to work for the case when I use that https://github.com/purcell/envrc
(use-package envrc
:config
(envrc-global-mode))
or whateverCouldn’t solve the issue 🤷 tried all packages and configurations. Trying terminal-based emacs.