Skip to content

Instantly share code, notes, and snippets.

@digizeph
Last active September 10, 2022 14:59
Show Gist options
  • Save digizeph/90841b6b047332e2d93f6f3e5bdc2338 to your computer and use it in GitHub Desktop.
Save digizeph/90841b6b047332e2d93f6f3e5bdc2338 to your computer and use it in GitHub Desktop.
Emacs 27 and Doom Emacs Setup Guide

Emacs 27 and Doom Emacs Setup Guide

Goal

Build Emacs 27 from source code and install Doom Emacs

Install Emacs

Checkout sourcecode

git clone https://github.com/emacs-mirror/emacs.git
cd emacs
git checkout emacs-27

Install dependency packages

On Pop!_OS 20.04

Library packages needed for a plain ./configure

  • texinfo
  • build-dep inkscape (for gtk+)
  • libxpm-dev
  • libgif-dev
  • gnutls-dev
  • libncurses-dev
  • libtinfo-dev
  • libwebkit2gtk-4.0-dev

In summary, the following two commands should do

sudo apt install autoconf texinfo libxpm-dev libgif-dev gnutls-dev libncurses-dev libtinfo-dev libtiff-dev libjpeg-dev libgtk-3-dev libwebkit2gtk-4.0-dev
# sudo apt build-dep inkscape

Configure and Build

./autogen.sh
./configure --with-xwidgets
make -j48

To make building quicker, I use make -j48 for a 16-core system. Roughly 1.5 times of the total cores available (including hyper threads).

Install DoomEmacs

Checkout the official page first, the installation steps may change: https://github.com/hlissner/doom-emacs

I use the following two commands:

git clone --depth 1 https://github.com/hlissner/doom-emacs ~/.emacs.d
~/.emacs.d/bin/doom install

Install Private Config

If you have private configs in different repos like me, you should also check out that and put it under ~/.doom.d directory.

Remember to sync the private configure to doom first by ~/.emacs.d/bin/doom sync

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment