Clojure Emacs CIDER repl - no environment variables from .profile are available

I don't know if this is a common Emacs issue or clojure / cider specification. Anyway: how to pass environment variables that work in the shell and are currently configured in my ~ / .profile. Now, if I am in my project, this works fine:

(System/getenv "FOO") -> "BAR 

But when I sit in my project, the CIDER replica cannot see the variable:

 (System/getenv "FOO") -> nil 

I am using Emacs version 24.4.50 with GUI (Cocoa). The version for cider is cider-20140718.747.

+5
source share
1 answer

You can either set noise suppressors as set by the environment on the whole system, so you don’t have to force emacs to use your .profile options, or you can run emacs from the command line to get settings from .profile, as in this answer: fooobar. com / questions / 406009 / ... Running from the command line is good because you can run multiple emacs with different settings. or run them from a script:

 FOO="BAR" /Applications/Emacs.app/Contents/MacOS/Emacs project.clj 

starts emacs with foo having the value "BAR", without changing any system as a whole.

+3
source

Source: https://habr.com/ru/post/1200157/


All Articles