- install wsl
- install a version of ubuntu 24+
- install all emacs deps as per doom documentation
- launch vanilla emacs (it will launch in the terminal this is fine use C-x C-c to exit)
- exit and stop wsl
- clone doom repo
- delete ~/.emacs.d (won't work if you do not do this you need to do this to ensure you can use an x11 session)
- re-run doom install
- should now work
- Ensure you enable the daemon otherwise you will have 6/7second launch times
systemctl enable --user emacs
More guides:
The easiest way to install Emacs is by using Chocolatey:
$ choco install git emacs ripgrep fd llvm
Scoop will work too, but because Emacs is a GUI application you’ll need to enable the ‘extras’ Scoop bucket:
Verify that it is installed by running this in a terminal:
This is important too as it will create a .emacs.d folder in your root user directory which we will need soon.
$ emacs
A default Emacs window should open.
[https://mywindowshub.com/how-to-edit-system-environment-variables-for-a-user-in-windows-10/](guide on creating ENVS in Windows)
-
Create a
HOMEsystem environment variable.Set it to
C:\Users\USERNAME\, otherwise Emacs will treatC:\Users\USERNAME\AppData\Roamingas yourHOME, which will cause issues later. -
Add
C:\Users\USERNAME\.emacs.d\binto yourPATH.This way, you don’t have to type all of
C:\Users\USERNAME\.emacs.d\bin\doomevery time you need to run this script (and you’ll need to, often).A pre-existing PATH variable should already exist among your system variables. It contains a string of file paths separated by colons;
pathA:pathB:pathC. Prepend the path to bin/doom to that string, like so:C:\Users\username\.emacs.d\bin:pathA:pathB:pathC -
Restart your system so your new values for
HOMEandPATHtake effect.
Clone the Doom Emacs git repository. Run this command in Powershell:
$ git clone https://github.com/doomemacs/doomemacs.git .emacs.d
After this is done, you can run the doom emacs install script. Run this command in Powershell:
$powershell -noexit -ExecutionPolicy Bypass -File .\.emacs.d\bin\doom install
You should now be able to run Doom Emacs by just typing emacs in a terminal. You might notice that it may be slow
to start and hang sometimes. This is because you are meant to use Emacs as a client/server application. Emacs comes with
a server that you can run and then connect to with emacs clients. This makes it launch a lot faster.
Launch an emacs server by running:
$ emacs --daemon
Connect to it by running:
$ emacsclient -c
When you installed Emacs through Chocolatey, it created binaries for emacs, emacsclient, emacsclientw, and runemacs.
emacsclientw is the one you want to use since it will create an emacs client in a new window. To make a shortcut to this
to use on the taskbar:
Right click on your desktop and create a new shortcut set the target to
"C:\tools\emacs\bin\emacsclientw.exe -c -a="Include the quotes- This will then launch an emacs client. If a server isn't running, it will start one and connect to it.
To automatically start the emacs server whenever your computer restarts:
- Make a shortcut in the "C:\Users<USER>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" directory
- The target will be "C:\tools\emacs\bin\runemacs.exe --daemon" do not include the quotes