I frequently experiment with GNU Emacs configuration. Different starters like Doom or Centaur. Sometimes even one of my own experiments.
Chemacs for the Emacs profiles
Chemacs helps me juggle all those configurations. Since I am now up to four configs — five, since I started collecting these notes — this may or may not be a good thing.
Grabbing installation instructions from the Chemacs README
:
[ -f ~/.emacs ] && mv ~/.emacs ~/.emacs.bak
[ -d ~/.emacs.d ] && mv ~/.emacs.d ~/.emacs.default.d
git clone https://github.com/plexus/chemacs2.git ~/.emacs.d
I add the configuration of the week to ~/.emacs-profiles.el
.
(("better" . ((user-emacs-directory . "~/.emacs.better.d")))
("bmw" . ((user-emacs-directory . "~/.emacs.bmw.d")))
("doom" . ((user-emacs-directory . "~/.emacs.doom.d"))))
Now I can launch a specific profile by name:
emacs --with-profile better
If I fire up “Emacs” from the desktop, it’ll use the profile named in ~/.emacs-profile
.
doom
“Better Defaults” for guests or a safe fallback
I need a stable profile for when pairing. Also handy when my experiments break something. That’s where Phil Hagelberg’s better-defaults comes in.
Clone the repo and load it, and you’re basically done. It’s Emacs, but just a little better.
(add-to-list 'load-path "~/.emacs.better.d/elisp")
(require 'better-defaults)