Skip to content

Instantly share code, notes, and snippets.

@desyncr
Forked from digizeph/emacs-installation.org
Last active September 10, 2022 15:13
Show Gist options
  • Save desyncr/cee1c096ba39b1e8b6dd1367f00a16fd to your computer and use it in GitHub Desktop.
Save desyncr/cee1c096ba39b1e8b6dd1367f00a16fd to your computer and use it in GitHub Desktop.
Emacs 28 and Doom Emacs Setup Guide

Emacs 28 and Doom Emacs Setup Guide

Goal

Build Emacs 28 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-28

Install dependency packages

On Pop!_OS 20.04

Library packages needed for a plain ./configure

  • texinfo
  • gnutls-dev
  • libncurses-dev
  • libtinfo-dev
  • libwebkit2gtk-4.0-dev

In summary, the following two commands should do

sudo apt install libxpm-dev libgif-dev libjpeg-dev libpng-dev libtiff-dev libx11-dev libncurses5-dev automake autoconf texinfo libgtk2.0-dev
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt install gcc-10 g++-10 libgccjit0 libgccjit-10-dev libjansson4 libjansson-dev

Configure and Build

export CC=/usr/bin/gcc-10 CXX=/usr/bin/gcc-10
./autogen.sh
./configure --with-native-compilation --with-json --with-xwidgets
make -j$(nproc)

Install Doom Emacs

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