Appendix F.  Build emacs

  1. Get the source code.

    git clone git://git.sv.gnu.org/emacs.git

  2. 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

  3. Compile

    cd emacs ./autogen.sh ./configure --with-pgtk --with-native-compilation --with-imagemagick make -j8

  4. Remove Apt-based emacs.

    sudo apt install emacs-

    Note

    may want to dig deeper for other emacs-related packages.

  5. Install

    sudo make install