# install git $ sudo apt install git # install build dependencies of emacs 25 (the current version in Debian repo) $ sudo apt build-dep emacs25 # clone the master branch of repo (current bleeding-edge version is 25) # download size approx. 235 MiB $ git clone -b master git://git.sv.gnu.org/emacs.git # or alternatively, you can download the current stable release of emacs # download size approx. 55 MiB # Switzerland mirror http://mirror.switch.ch/ftp/mirror/gnu/emacs/ # change directory $ cd emacs # generate configure script $ ./autogen.sh all # configure your build $ ./configure --with-mailutils # build emacs $ make # run emacs (the binary file is in src/emacs directory) $ src/emacs # (optional) move the binary files to the system directory to be available globally $ sudo make install # (optional) uninstall the newly installed emacs # change to the emacs source directory $ cd emacs $ sudo make uninstall