Hello,
I would like to try doom emacs but I don't want to screw my current emacs config.
How can I install it alongside my emacs config ?
Can I just put my emacs.d to a new git branch ?
Thx
Hello @4vrel ,
doom-emacs allows to run it from any folder using ./bin/doom run
So you can follow https://github.com/hlissner/doom-emacs/wiki/Getting-Started
but use replace .emacs.d with .emacs.doom.d
Another option is to use chemacs, which lets you have multiple simultaneous emacs profiles, selected with a command-line argument to emacs.
I have tried chemacs and it doesn't work with the bin/doom commands actually doom has hardcoded ~/.emacs.d in some places in the code.
@kisai This is false, doom works fine with chemacs.
For example, with the following setup:
~/.emacs.d~/.emacs.doom.d~/.emacsAnd the following ~/.emacs-profiles.el:
(("default" . ((user-emacs-directory . "~/.emacs.d")))
("doom" . ((user-emacs-directory . "~/.emacs.doom.d"))))
The vanilla configuration will launch when running emacs, and doom will run when running emacs --with-profile=doom. If you've moved your doom directory, run bin/doom refresh first to fix the autoloads.
I have tried that and it works but when i try to run any of the bash commands complains.
@kisai Please post the entire command output with the error message you're seeing, preferably as new issue.
You need to run <doom-emacs-dir>/bin/doom re after you have moved directory different place.
EDIT: I use two different Emacs configurations, one personal (few days ago started configuring) and doom (emacs).
Here is a TL;DR on setting up Chemacs with Doom Emacs: https://gist.github.com/hlissner/d01f035d3fdb2dbbec0d95da7bcd5862
Doom doesn't hardcode the emacs directory. bin/doom resolves the location of your emacs.d based on the location of the bin/doom script itself. e.g. ~/some/folder/containing/doom/bin/doom will assume Doom lives in ~/some/folder/containing/doom.
bin/doom run also allows you to run Doom out of its current location, but all of its startup optimizations are bypassed this way, so it's only good for quick testing.
Here is what i did:
mv ~/.emacs ~/.my_emacsmv ~/.emacs.d ~/.my_emacs.d(setq user-emacs-directory "~/.my_emacs.d/")Now switching is easy:
switch to my config:
ln -s ~/.emacs_mine ~/.emacs
switch to doom-emacs:
unlink ~/.emacs
I'll assume the OPs original issue was resolved and close this. In summary, bin/doom run will run Emacs out of the parent directory of the bin/doom script. Otherwise, check out chemacs, here are some TLDR instructions for it. If you have any other problems or questions about this, feel free to follow up here.
Most helpful comment
@kisai This is false, doom works fine with chemacs.
For example, with the following setup:
~/.emacs.d~/.emacs.doom.d~/.emacsAnd the following
~/.emacs-profiles.el:The vanilla configuration will launch when running
emacs, and doom will run when runningemacs --with-profile=doom. If you've moved your doom directory, runbin/doom refreshfirst to fix the autoloads.