Hey I should use this blog sometimes. I started fiddling with my Emacs configuration again, to modernize it, try out new features/packages, and remove some things that annoyed me but that I didn’t get around to fixing before. My configuration is now split over multiple .el files and contains many interesting or useful tweaks. But that made me wonder: what is the minimal configuration for stock Emacs (versions 30.1 to 31.1) that I cannot live without? So why not blog about it?

I came up with this:

;;; General

;; Replace selection.
(delete-selection-mode)

;; Startup screen: useful for newbies, annoying for me.
(setq inhibit-startup-screen t)

;; Column numbers in mode line, I miss this otherwise.
(column-number-mode)

;; No tabs.
(setq-default indent-tabs-mode nil)

;; I'm still experimenting with this, but changing
;; indentation of the current line on RET messes
;; with my head (e.g. in C mode).
(electric-indent-mode -1)

;; Undo window layout changes with C-c <left>.
;; A recent addition to my config, but removes major
;; annoyances with window layout changes for me.
;; Became a must.
(winner-mode)

;; Progressive mouse wheel scrolling is too
;; unpredictable for me.
(setq mouse-wheel-progressive-speed nil)

;; Mouse wheel scroll with reasonable speed (for me).
(setq mouse-wheel-scroll-amount
      '(3
        ((shift) . hscroll)
        ((meta))
        ((control) . text-scale)))
(setq mouse-wheel-scroll-amount-horizontal 5)

;; No mouse support in terminal.  When I open an
;; editor in the terminal, I'm in a different mindset
;; and want the mouse for selecting text only.  I'm
;; probably in a small minority for this.
(setopt xterm-mouse-mode nil)


;;; Gnus

;; Do not pollute my home with unwanted directories.
(let ((gnusdir (file-name-concat user-emacs-directory
                                 "gnus")))
  (setq gnus-directory
        (file-name-as-directory
         (file-name-concat gnusdir "News")))
  (setq message-directory
        (file-name-as-directory
         (file-name-concat gnusdir "Mail")))
  (setq nnfolder-directory
        (file-name-as-directory
         (file-name-concat gnusdir "Mail" "archive"))))

;; Never load remote images.
(setq gnus-blocked-images ".")

;; Omitted: IMAP and SMTP config.


;;; Dired

;; Don't show hidden dotfiles by default, except
;; for . and .., otherwise the home directory is a
;; mess. Toggle: C-x M-o.
(setopt dired-omit-files "\\`\\.[^.]\\|\\`\\.\\.[^.]")
(setopt dired-omit-extensions '())
(add-hook 'dired-mode-hook #'dired-omit-mode)

There are many other things I don’t want to miss, but the selection above is essential. If those are missing, I notice it immediately.

I found this quite interesting: my actual configuration is much longer, but these are the biggest pain points. No custom functions or fancy Elisp, just some tweaks.

Is your essential Emacs config longer? Shorter? Similar or completely different? If you blog about it, let me know :)