Doom-emacs. It's a configuration framework for Emacs. Basically, it overrides the Emacs keybindings with most of vim's.
As I mentioned in the last post. I started using Emacs at work due to org-mode… and work PC's use windows behind a Firewall, so using git, pip, melpa and some more are useless in my work desktop (In the Laptop all of them work if I connect to another network, which was what I did).
As you can imagine, Doom is for a GNU program so Windows support is limited (because, who cares?). The guide is poor, it describes how to install it with scoop/chocolatey (that don't work with a firewall). However, you can use the git-bash to install Doom without scoop/chocolatey. Here is how you do it:
What you need
If you have limited permissions in Windows PC (e.g. admin privileges), you might not be able to use Chocolatey/Scoop.
However, you can still use git-bash.exe
portable version!
- Download git.
- Download Ripgrep and fd. Make sure you download the
windows-gnu
version. - Of course, download emacs.
Extract the binaries1 from Ripgrep
and fd
to their respective folders and place them where you want.
- You should have one folder for
Ripgrep
and another forfd
.
Extract emacs and place it where you want.
It does not matter where they are, we will add them to the Path
later (but keep them
safe and where you can remember).
Instructions
Edit system environment variables
Go to
Control panel -> User Accounts -> Change my environment variables
.New
, typeHOME
and set yourC:\Users\USERNAME
andOK
.- Select
Path
,edit
and add yourC:\path\to\the\emacs\bin
folder andOK
. - Select
Path
,edit
and add yourC:\path\to\the\ripgrep
folder andOK
. - Select
Path
,edit
and add yourC:\path\to\the\fd
folder andOK
. - Click
Ok
.
- We still need to add
C:\Users\USERNAME\.emacs.d\bin
; but first download Doom files.
Install Doom
- Open
git-bash.exe
- Type
cd ~
- Run:
git clone https://github.com/hlissner/doom-emacs ~/.emacs.d
- After the download is completed, type
cd ~/.emacs.d/bin
and run:./doom install
- If everything is fine, Doom is now installed.
- Just in case run
./doom sync
Go to
Control panel -> User Accounts -> Change my environment variables
.- Select
Path
,edit
and addC:\Users\USERNAME\.emacs.d\bin
, clickOK -> OK
.
- Select
- Now you can start emacs and will see the Doom dashboard!
Nerd icons
By default icons will not be enabled in Windows.
- If icons is not installed. Open emacs and
M-x nerd-icons-install-fonts RET
. - Select where to download the fonts and install them (double click -> install).
- Restart emacs and there you go.
From one PC to another
If one of your PCs does not have internet connection or is under a firewall, you can:
- Copy your
~/.doom.d ~/.emacs.d ripgrep fd emacs
folders directly to the other PC (~/.domm.d ~/.emacs.d
go inC:\Users\USERNAME
) - Edit the system environment variables accordingly.
- Copy and install the fonts you downloaded with
nerd-icons-install-fonts
- Open
git-bash.exe
,cd ~/.emacs.d/bin
and run:./doom sync
- et voilà!.
Emacs server
If you use emacs server, Doom will place the server file in
C:\Users\USERNAME\.emacs.d\server
folder.
Go to
Control panel -> User Accounts -> Change my environment variables
.New
typeEMACS_SERVER_FILE
and set the file pathC:\Users\USERNAME\.emacs.d\server\server
.- Create a
emacsclientw.exe
shortcut withemacsclientw.exe -nc
in target, run emacs server and emacsclientw will work.
Now, rejoice!
If you found this content useful, please support me:
BTC: 1E2YjL6ysiPxRF4AEdXChpzpesRuyzgE1y
with binaries I mean the .exe