Emacs 29.1 installation from bookworm-backports

  1. Go to https://packages.debian.org/bookworm-backports/emacs and download into a folder , let's say /home/user/emacs

See /sites/default/files/styles/large/public/2023-11/Debian-Details-of-package-emacs-in-bookworm-backports.png?itok=Vk6ipX8C

  1. Run sudo apt-get install build-essential devscripts debhelper and sudo apt-get install gcc-12 libgccjit-12-dev libjansson-dev libsqlite3-dev libtree-sitter-dev libwebp-dev . To be sure install all dependency packages in this list

  2. Go inside /home/user/emacs and run

dpkg-source -x  emacs_29.1+1-5\~bpo12+1.dsc
sudo apt-get build-dep emacs
  1. Go inside /home/user/emacs/emacs-29.1+1 and run
dpkg-buildpackage -us -uc
  1. Go inside /home/user/emacs and verify that all .deb packages have been created.
emacs-29.1+1
emacs_29.1+1-5~bpo12+1_all.deb
emacs_29.1+1-5~bpo12+1_amd64.buildinfo
emacs_29.1+1-5~bpo12+1_amd64.changes
emacs_29.1+1-5~bpo12+1.debian.tar.xz
emacs_29.1+1-5~bpo12+1.dsc
emacs_29.1+1.orig.tar.xz
emacs-bin-common_29.1+1-5~bpo12+1_amd64.deb
emacs-bin-common-dbgsym_29.1+1-5~bpo12+1_amd64.ddeb
emacs-common_29.1+1-5~bpo12+1_all.deb
emacs-el_29.1+1-5~bpo12+1_all.deb
emacs-gtk_29.1+1-5~bpo12+1_amd64.deb
emacs-gtk-dbgsym_29.1+1-5~bpo12+1_amd64.ddeb
emacs-lucid_29.1+1-5~bpo12+1_amd64.deb
emacs-lucid-dbgsym_29.1+1-5~bpo12+1_amd64.ddeb
emacs-nox_29.1+1-5~bpo12+1_amd64.deb
emacs-nox-dbgsym_29.1+1-5~bpo12+1_amd64.ddeb
emacs-pgtk_29.1+1-5~bpo12+1_amd64.deb
emacs-pgtk-dbgsym_29.1+1-5~bpo12+1_amd64.ddeb

Next, run

sudo dpkg -i *.deb

That is all.

> emacs --version

emacsclient 29.1
  1. Restart your laptop if you have errors with evil mode for example.
Images
/sites/default/files/styles/large/public/2023-11/Debian-Details-of-package-emacs-in-bookworm-backports.png?itok=Vk6ipX8C
/sites/default/files/styles/large/public/2023-11/https-deb-debian-org-debian-pool-main-e-emacs-emacs_29-1-1-5-bpo12-1-dsc.png?itok=IhKwCM82