On Macs, defining environment variables in the environment.plist will allow you to use environment variables in Emacs.app. On Linux, is there such an equivalent?
I don't want to use the environment variables in one of the shell or terminal emulators but also for find-file
(C-x C-f), shell-command
(C-!), etc. and I have a lot of paths defined as environment variables that would be helpful here. For instance, finding a file with find-file
can be $WORK/projectname and so on.
I suppose the most straightforward way is to use setenv
within .emacs
, but as I have a lot of such variables it would be better if I could define it once in an external file and have Emacs read it in.
Edit: Sorry for the confusion. This question is specifically addressing issue of Emacs access, as variables defined in ~/.bashrc is not available to Emacs until shell, eshell, or term is invoked.