Emacs Configuration

In my Emacs configuration I capture…pretty much everything for the sake of documentation and customization.

I'll also be looking to make wider use of some of these settings which will be covered as it happens.

I'll be starting with some fairly raw elisp and refining it from there. I'll likely shift many things over to be more declarative as I go while tryingto avoid too many elisp idiosyncracies.

Inputs

Basic Characters

Letters

(bind-key "a" #'self-insert-command)
(bind-key "b" #'self-insert-command)
(bind-key "c" #'self-insert-command)
(bind-key "d" #'self-insert-command)
(bind-key "e" #'self-insert-command)
(bind-key "f" #'self-insert-command)
(bind-key "g" #'self-insert-command)
(bind-key "h" #'self-insert-command)
(bind-key "i" #'self-insert-command)
(bind-key "j" #'self-insert-command)
(bind-key "k" #'self-insert-command)
(bind-key "l" #'self-insert-command)
(bind-key "m" #'self-insert-command)
(bind-key "n" #'self-insert-command)
(bind-key "o" #'self-insert-command)
(bind-key "p" #'self-insert-command)
(bind-key "q" #'self-insert-command)
(bind-key "r" #'self-insert-command)
(bind-key "s" #'self-insert-command)
(bind-key "t" #'self-insert-command)
(bind-key "u" #'self-insert-command)
(bind-key "v" #'self-insert-command)
(bind-key "w" #'self-insert-command)
(bind-key "x" #'self-insert-command)
(bind-key "y" #'self-insert-command)
(bind-key "z" #'self-insert-command)
(bind-key "A" #'self-insert-command)
(bind-key "B" #'self-insert-command)
(bind-key "C" #'self-insert-command)
(bind-key "D" #'self-insert-command)
(bind-key "E" #'self-insert-command)
(bind-key "F" #'self-insert-command)
(bind-key "G" #'self-insert-command)
(bind-key "H" #'self-insert-command)
(bind-key "I" #'self-insert-command)
(bind-key "J" #'self-insert-command)
(bind-key "K" #'self-insert-command)
(bind-key "L" #'self-insert-command)
(bind-key "M" #'self-insert-command)
(bind-key "N" #'self-insert-command)
(bind-key "O" #'self-insert-command)
(bind-key "P" #'self-insert-command)
(bind-key "Q" #'self-insert-command)
(bind-key "R" #'self-insert-command)
(bind-key "S" #'self-insert-command)
(bind-key "T" #'self-insert-command)
(bind-key "U" #'self-insert-command)
(bind-key "V" #'self-insert-command)
(bind-key "W" #'self-insert-command)
(bind-key "X" #'self-insert-command)
(bind-key "Y" #'self-insert-command)
(bind-key "Z" #'self-insert-command)

Numbers

(bind-key "1" #'self-insert-command)
(bind-key "2" #'self-insert-command)
(bind-key "3" #'self-insert-command)
(bind-key "4" #'self-insert-command)
(bind-key "5" #'self-insert-command)
(bind-key "6" #'self-insert-command)
(bind-key "7" #'self-insert-command)
(bind-key "8" #'self-insert-command)
(bind-key "9" #'self-insert-command)
(bind-key "0" #'self-insert-command)

Symbols

(bind-key "~" #'self-insert-command)
(bind-key "`" #'self-insert-command)
(bind-key "!" #'self-insert-command)
(bind-key "@" #'self-insert-command)
(bind-key "#" #'self-insert-command)
(bind-key "$" #'self-insert-command)
(bind-key "%" #'self-insert-command)
(bind-key "^" #'self-insert-command)
(bind-key "&" #'self-insert-command)
(bind-key "*" #'self-insert-command)
(bind-key "(" #'self-insert-command)
(bind-key ")" #'self-insert-command)
(bind-key "-" #'self-insert-command)
(bind-key "_" #'self-insert-command)
(bind-key "=" #'self-insert-command)
(bind-key "+" #'self-insert-command)
(bind-key "[" #'self-insert-command)
(bind-key "]" #'self-insert-command)
(bind-key "{" #'self-insert-command)
(bind-key "}" #'self-insert-command)
(bind-key "|" #'self-insert-command)
(bind-key "\\" #'self-insert-command)
(bind-key ":" #'self-insert-command)
(bind-key ";" #'self-insert-command)
(bind-key "'" #'self-insert-command)
(bind-key "\"" #'self-insert-command)
(bind-key "," #'self-insert-command)
(bind-key "<" #'self-insert-command)
(bind-key "." #'self-insert-command)
(bind-key "<" #'self-insert-command)
(bind-key "/" #'self-insert-command)
(bind-key "?" #'self-insert-command)

Controlish Inputs

(bind-key "SPC" #'self-insert-command)
(bind-key "DEL" #'delete-backward-char)
(bind-key "<return>" #'newline)

Intra-Buffer Navigation

(bind-key "C-a" #'beginning-of-line)
(bind-key "C-l" #'recenter-top-bottom)
(bind-key "C-n" #'next-line)
(bind-key "C-p" #'previous-line)
(bind-key "M-}" #'forward-paragraph)

Buffer Management

(bind-key "C-x b" #'switch-to-buffer)
(bind-key "C-x C-s" #'save-buffer)

Window Management

(bind-key "C-x o" #'other-window)

Help

(bind-key "C-h b" #'describe-bindings)
(bind-key "C-h h" #'describe-key)
(bind-key "C-h l" #'view-lossage)

Minibuffer

(bind-key "<return>" #'minibuffer-complete-and-exit 'minibuffer-local-completion-map)
(bind-key "<tab>" #'minibuffer-complete 'minibuffer-local-completion-map)

Org Mode

Files

org-agenda-files can be set to reference org files or containing directories. Sometimes (maybe through customize?) using directories seems to lead to expansion to the underlying files which may be more efficient(?) but doesn't help if new files are added. Using elisp directly avoids this problem. The specific values would vary across systems so is not included here, but generally this should be something along the lines of:

(setq org-agenda-files (list "~/Documents/pod" some-other-dir))

Agenda

I use the agenda primarily as a continuous TODO list, so I only want to see today by default.

(setq org-agenda-span 'day)
(bind-key "g" #'org-agenda-redo-all 'org-agenda-mode)

Mode Selection

(unbind-key "C-x C-x")
(bind-key "C-x C-x g" #'gnus)
(bind-key "C-x C-x s" #'flyspell-mode)
(bind-key "C-x C-x a" #'org-agenda)

Gnus (1)(2)

(setq gnus-select-method '(nnimap "imap.gmail.com"))
1.
Gnus Newsreader Homepage. [online]. [Accessed 23 February 2025]. Available from: http://www.gnus.org/
2.
Gnus. Wikipedia [online]. 2022. [Accessed 22 February 2025]. Available from: https://en.wikipedia.org/w/index.php?title=Gnus&oldid=1092661847
Gnus (), or Gnus Network User Services, is a message reader which is part of GNU Emacs. It supports reading and composing both e-mail and news and can also act as an RSS reader, web processor, and directory browser for both local and remote filesystems. Gnus blurs the distinction between news and e-mail, treating them both as “articles” that come from different sources. News articles are kept separate by group, and e-mail can be split into arbitrary groups, similar to folders in other mail readers. In addition, Gnus is able to use a number of web-based sources as inputs for its groups.
Page Version ID: 1092661847