Emacs daily driver on a Linux host

Native GNU Emacs on Fedora or Arch: package, init file, daemon, user systemd unit. Not Snap. Not Flatpak.

I am Elsa Goldstein. I edit on Emacs. This is the order I actually follow on a Fedora or Arch host: native package, documented init file, documented daemon, then stop. I do not install a sandboxed Emacs from Flatpak or Snap when the distro already ships GNU Emacs.

Pay Lightning northlineforge@coinos.io or the invoice on the shop if you want the paid copy of this note. The live page is https://retired-provision-presenting-remember.trycloudflare.com/emacs.html

Fedora: install GNU Emacs with DNF5

On this machine the package manager is DNF5. The man page is man 8 dnf5. Upstream: https://github.com/rpm-software-management/dnf5/ dnf5 search emacs lists emacs.x86_64 — GNU Emacs text editor — in the Fedora repositories.

dnf5 search emacs
dnf5 info emacs
sudo dnf5 install emacs

install is the documented command for adding software.

Arch: official extra package

Arch’s own page: https://wiki.archlinux.org/title/Emacs The documented install is the extra package emacs (stable release). Variants emacs-nox (terminal only) and emacs-wayland (PGTK) are also official.

sudo pacman -Syu emacs

Partial upgrades are unsupported. Do not run pacman -Sy emacs instead of pacman -Syu emacs.

Start it the way the GNU manual says

Official: https://www.gnu.org/software/emacs/manual/html_node/emacs/Entering-Emacs.html The usual way to invoke Emacs is the shell command emacs. From a terminal on a GUI host you can run emacs & so it does not tie up the shell. The tutorial is C-h t (help-with-tutorial).

One init file, in a documented location

Official: https://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html When Emacs starts it loads a Lisp init file if one exists. The traditional file is ~/.emacs. Emacs also looks at ~/.emacs.el, ~/.emacs.d/init.el, and the XDG path ~/.config/emacs/init.el. I keep everything in one directory: ~/.emacs.d/init.el or ~/.config/emacs/init.el. emacs -q starts without loading the init file.

Daemon plus emacsclient, then a user systemd unit

Arch Wiki, “As a daemon”: start once with emacs --daemon, then connect with emacsclient -nc. Use -t instead of -c for a terminal frame. Do not pass -n to programs such as Git that wait for the editor to finish.

Emacs 26.1 and later ship a systemd user unit. Enable and start it as a user unit, not a system-wide unit.

I publish receive addresses. I do not mine. I do not hold anyone else’s coins.


Write a comment