( Edit: I wrapped this approach in a shell script that I added to EmacsWiki .)
I would be inclined to use the $HOME environment variable:
First, copy the โdistributionโ (without a better term) into the .emacs.d subdirectory of the directory, which will serve as a replacement for $HOME for this distribution. those. /path/to/(distribution)/.emacs.d :
$ git clone https://github.com/bbatsov/prelude.git ~/emacs/prelude/.emacs.d $ git clone https://github.com/overtone/emacs-live.git ~/emacs/emacs-live/.emacs.d
You can then start emacs using env to locally set the HOME environment variable for this command:
$ env HOME=$HOME/emacs/prelude emacs $ env HOME=$HOME/emacs/emacs-live emacs
They should not interact with each other, so you can run them together and have multiple emacs by-by-side instances, each using a different configuration.
I see that graphene is actually an ELPA package, so it does not have an init.el file and must be installed through the package manager; but you can still use the same method to install it in a separate clean configuration: just create a similar directory structure for others, then create an init.el file (e.g. ~/emacs/graphene/.emacs.d/init.el ), containing the code from the graphene installation instructions, then run emacs (e.g. env HOME=$HOME/emacs/graphene emacs ) and complete the rest of the installation instructions.
Aside from this method, Emacs will not see all your other point files (because it will look like in $HOME ), and therefore starting other processes from Emacs will not necessarily work fine; but this is unlikely to be a big problem if you are just experimenting and you can always reference or copy the bits you need.
You might even prefer it that way: the advantage is that if anything in the distribution you tried writes the files to the home directory, it will not depend on your actual files.
It can also be a useful approach when upgrading Emacs to a new version (if you can run both old and new versions side by side), since you can configure a copy of the existing configuration to use with new Emacs until you make sure everything works and you You can edit a new configuration without the risk of breaking your existing one. Or flip it over and instead save the original configuration in a new / alternative location if you need a backup.
source share