Appendix F. Build emacs
-
Get the source code.
git clone git://git.sv.gnu.org/emacs.git
-
Install the prerequisites to compile it.
sudo apt install make autoconf libgtk-3-dev libncurses6 gnome-tweaks gnutls-bin libgnutls28-dev libncurses5-dev libgif-dev libxpm-dev libsqlite3-dev libmagickwand-dev libtree-sitter-dev texinfo
-
Compile
cd emacs
./autogen.sh
./configure --with-pgtk --with-native-compilation --with-imagemagick
make -j8
-
Remove Apt-based emacs.
sudo apt install emacs-
Note
may want to dig deeper for other emacs-related packages.
-
Install
sudo make install