Chemacs2 is a bootloader for Emacs. It allows you to switch between multiple Emacs configurations. Here is a quick guide for setting it up with Doom Emacs as the default config:
- First, install Doom somewhere:
git clone https://github.com/hlissner/doom-emacs ~/doom-emacs ~/doom-emacs/bin/doom install
- Move aside any existing config and install Chemacs2 as your new
~/.emacs.d
:[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.bak [ -d ~/.emacs.d ] && mv ~/.emacs.d ~/.emacs.legacy git clone https://github.com/plexus/chemacs2.git ~/.emacs.d
- Create
~/.emacs-profiles.el
with a list of your Emacs profiles. This file is structured like a.dir-locals.el
file. Here is an example with Doom (as the default), Spacemacs, and Prelude:(("default" . ((user-emacs-directory . "~/doom-emacs"))) ("legacy" . ((user-emacs-directory . "~/.emacs.legacy"))) ("spacemacs" . ((user-emacs-directory . "~/spacemacs"))))
To start Emacs with a specific config, use the --with-profile
option:
emacs --with-profile spacemacs