Environment Variable
ofenerci opened this issue · 5 comments
Hello,
I wonder Env. variable could be applied for ordinary Emacs( I have different version of Emacs and each version has its own config files.)
For example:
("emacs27" . ((user-emacs-directory . "~/.emacs27.d")
(env . (("EMACSDIR" . "~/Personal/dotfile/emacs27"))))
In the document, it is mentioned there are env. variable Spacemacs and Doom Emacs.
env
is not specific to Spacemacs or Doom, you can use it regardless of your setup.
https://github.com/plexus/chemacs#emacs-profilesel
env
An association list of environment variables. These will get set before loading the profile, so they can influence the initialization, and they are visible to any subprocesses spawned from Emacs.
Hello,
What is my understanding from the document:
user-emacs-directory: This is directory where I download packages (Elpa packages, etc.)
"EMACSDIR" is where you put your configuration files( init.el).
What I would like to do:
a) My emacs27 package installation (installing from elpa) should go to the .~/emacs27.d
directory.
b) My init.el
file should be read from "~/Personal/dotfile/emacs27
user-emacs-dir
is where you put your init.el
ELPA packages are installed in package-user-dir
There is no such thing as EMACSDIR
.
I understand now. But what is the reason have environment variable. You could give a concrete example how to use it.
The reason is that sometimes you need it, there are two examples in the README, SPACEMACSDIR
and DOOMDIR
. Environment variables are a generic unix concept that's been around for decades, generally people who need that feature will know they do. The rest can ignore it.