Mostly Default: A GNU Emacs Configuration
Latest version: Thursday 30 October 2025 at 01:55:45 PM GMT
1. early-init.el
;;; -*- lexical-binding: t; -*-
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(setq frame-inhibit-implied-resize 'force
frame-resize-pixelwise t
frame-title-format '("%b")
inhibit-startup-buffer-menu t
inhibit-startup-message t
inhibit-x-resources t
initial-scratch-message ";; Welcome to Emacs! This is the scratch buffer.
"
use-file-dialog nil
use-short-answers t)
2. init.el
;;; -*- lexical-binding: t; -*-
(require 'package)
(setq package-archives
'(("elpa" . "https://elpa.gnu.org/packages/")))
(add-hook 'package-menu-mode-hook #'hl-line-mode)
(unless package-archive-contents
(package-refresh-contents t))
(setq package-selected-packages
'(auctex denote denote-journal orderless))
(package-install-selected-packages t)
(setq user-full-name "Michael J.W. King"
user-mail-address "public@michaeljwking.com")
(setq gnus-cache-active-file "~/News/cache/active"
gnus-cache-directory "~/News/cache/"
gnus-directory "~/News/"
mail-signature-file "~/Mail/.signature"
message-directory "~/Mail/"
message-signature-file "~/Mail/.signature"
nnfolder-directory "~/Mail/archive/"
nnfolder-active-file "~/Mail/archive/active"
org-directory "~/documents")
(setq make-backup-files nil
create-lockfiles nil
custom-file (make-temp-file "custom-dump-"))
(setq doc-view-resolution 300)
(setq hl-line-sticky-flag nil)
(add-hook 'help-mode-hook 'visual-line-mode)
(add-hook 'help-mode-hook 'variable-pitch-mode)
(setq custom-safe-themes t)
(require-theme 'modus-themes)
(setq modus-themes-bold-constructs t
modus-themes-common-palette-overrides
'((bg-prose-block-contents bg-dim)
(bg-prose-block-delimiter bg-ochre)
(fg-prose-block-delimiter fg-main)
(bg-mode-line-active bg-ochre)
(fg-mode-line-active fg-main)
(border-mode-line-active unspecified)
(border-mode-line-inactive unspecified))
modus-themes-disable-other-themes t
modus-themes-italic-constructs t
modus-themes-mixed-fonts t
modus-themes-to-toggle '(modus-operandi modus-vivendi)
modus-themes-variable-pitch-ui t)
(load-theme 'modus-operandi)
(defun mk/modus-theme-font-override ()
(set-face-attribute 'default nil
:family "Aporetic Serif Mono"
:weight 'regular
:height 140)
(set-face-attribute 'fixed-pitch nil
:family "Aporetic Serif Mono"
:weight 'regular)
(set-face-attribute 'variable-pitch nil
:family "Aporetic Serif"
:weight 'regular)
(set-face-attribute 'bold nil
:weight 'bold))
(add-hook 'after-init-hook #'mk/modus-theme-font-override)
(add-hook 'modus-themes-after-load-theme-hook #'mk/modus-theme-font-override)
(setq-default fill-column 80
sentence-end-double-space nil)
(setq tab-always-indent 'complete)
(setq max-mini-window-height 0.24)
(setq display-buffer-alist
'(
("\\*Calendar\\|Agenda Commands\\*"
;; list of display functions
(display-buffer-below-selected)
;; optional parameters
(dedicated . t)
)
("\\*Completions\\*"
;; list of display functions
(display-buffer-below-selected)
;; optional parameters
(window-parameters . ((mode-line-format . none)))
)
("\\*eshell\\*"
;; list of display functions
;; (display-buffer-reuse-mode-window
(display-buffer-below-selected)
;; optional parameters
(window-height . 0.38)
(dedicated . t)
(window-parameters . ((mode-line-format . none)))
)
("\\*Help\\*"
;; list of display functions
(display-buffer-in-side-window)
;; optional parameters
(window-width . 0.38)
(side . left)
(slot . -1)
(dedicated . t)
)
("\\*Occur\\*"
;; list of display functions
(display-buffer-reuse-mode-window
display-buffer-below-selected)
;; optional parameters
(window-height . 0.38)
(dedicated . t)
(window-parameters . ((mode-line-format . none)))
)
("\\*Org Select\\*"
;; list of display functions
(display-buffer-in-side-window)
;; optional parameters
(dedicated . t)
(side . bottom)
(slot . 0)
(window-parameters . ((mode-line-format . none)))
)
("\\*vc-log\\*"
;; list of display functions
(display-buffer-below-selected)
;; optional parameters
(window-height . 0.38)
(dedicated . t)
(window-parameters . ((mode-line-format . none)))
)
))
(require 'orderless)
(setq completion-styles '(orderless basic flex)
completion-auto-help nil
completion-auto-select 'second-tab
completion-category-defaults nil
completion-category-overrides nil
completions-max-height nil
completions-header-format nil)
(icomplete-mode 1)
(setq icomplete-in-buffer nil
icomplete-max-delay-chars 0
icomplete-compute-delay 0
icomplete-separator " · "
icomplete-matches-format "[%s/%s] "
icomplete-prospects-height 1)
(setq isearch-lazy-count t
lazy-count-prefix-format "[%s/%s] "
lazy-count-suffix-format nil)
(add-hook 'occur-mode-hook #'hl-line-mode)
(require 'calendar)
(setq holiday-bahai-holidays nil
holiday-christian-holidays nil
holiday-general-holidays nil
holiday-hebrew-holidays nil
holiday-islamic-holidays nil
holiday-oriental-holidays nil)
(setq calendar-date-style 'european
calendar-date-display-form calendar-european-date-display-form
calendar-mark-diary-entries-flag t
calendar-mark-holidays-flag t
calendar-week-start-day 0
calendar-latitude 0.0
calendar-longitude 0.0
calendar-location-name "Home")
(add-hook 'calendar-today-visible-hook 'calendar-mark-today)
(setq display-time-format "%A %-d %B, %l:%M %p")
(setq display-time-default-load-average nil)
(display-time-mode 1)
(line-number-mode 1)
(require 'diary-lib)
(setq diary-date-forms diary-european-date-forms
diary-header-line-format nil
diary-comment-start ";;"
diary-comment-end "")
(with-eval-after-load 'dired
(setq dired-listing-switches "-Alh --group-directories-first"
dired-recursive-copies 'always
dired-recursive-deletes 'always)
(add-hook 'dired-mode-hook #'dired-hide-details-mode)
(add-hook 'dired-mode-hook #'hl-line-mode)
(add-hook 'dired-mode-hook #'dired-omit-mode))
(setq ibuffer-display-summary nil
ibuffer-saved-filter-groups
'(("Main"
("Dired" (mode . dired-mode))
("Emacs" (starred-name))
)))
(add-hook 'ibuffer-mode-hook
(lambda ()
(ibuffer-switch-to-saved-filter-groups "Main")))
(add-hook 'ibuffer-mode-hook #'hl-line-mode)
(require 'denote)
(setq denote-directory (expand-file-name "~/documents/"))
;; Cleaner mode-line view for denote files.
(denote-rename-buffer-mode 1)
(with-eval-after-load 'denote
;; Add colours to denote files when in dired.
(add-hook 'dired-mode-hook #'denote-dired-mode)
;; Make denote links clickable when in plain text modes.
(add-hook 'text-mode-hook #'denote-fontify-links-mode-maybe))
(setq denote-infer-keywords nil
denote-prompts '(title keywords file-type))
(setq denote-known-keywords
(list "draft" "final" "notebook" "wiki"))
(require 'denote-journal)
(setq denote-journal-directory denote-directory
denote-journal-keyword "journal"
denote-journal-title-format 'day-date-month-year)
(setq org-adapt-indentation nil
org-ellipsis " »"
org-enforce-todo-checkbox-dependencies t
org-export-date-timestamp-format "%A %e %B %Y at %r %Z"
org-export-with-toc nil
org-hide-emphasis-markers t
org-hide-leading-stars t
org-html-head-include-scripts nil
org-html-htmlize-output-type nil
org-insert-heading-respect-content t
org-log-done 'time
org-log-into-drawer t
org-M-RET-may-split-line '((default . nil)))
(org-babel-do-load-languages
'org-babel-load-languages
'((emacs-lisp . t)
(org . t)
(latex . t)
(lua . t)
(lilypond . t)))
(with-eval-after-load "ox-latex"
(add-to-list 'org-latex-classes
'("tufteparts" "\\documentclass{tufte-book}"
("\\part{%s}" . "\\part{%s}")
("\\chapter{%s}" . "\\chapter{%s}")
("\\section{%s}" . "\\section{%s}")
("\\footnote{%s}" . "\\sidenote{%s}")))
(add-to-list 'org-latex-classes
'("tufte" "\\documentclass{tufte-book}"
("\\chapter{%s}" . "\\chapter{%s}")
("\\section{%s}" . "\\section{%s}")
("\\footnote{%s}" . "\\sidenote{%s}")))
(add-to-list 'org-latex-classes
'("handbook" "\\documentclass{memoir}"
("\\part{%s}" . "\\part{%s}")
("\\chapter{%s}" . "\\chapter{%s}")
("\\section{%s}" . "\\section{%s}")
("\\tableofcontents" . "\\tableofcontents*")))
(add-to-list 'org-latex-classes
'("handout" "\\documentclass{tufte-handout}"
("\\section{%s}" . "\\section{%s}")
("\\footnote{%s}" . "\\sidenote{%s}")))
)
(setq org-agenda-files (list org-directory)
org-agenda-file-regexp "^.*_journal\.org"
org-agenda-include-diary t
org-agenda-restore-windows-after-quit t
org-agenda-skip-scheduled-repeats-after-deadline t
org-deadline-warning-days 3
org-todo-keywords
'((sequence "TODO(t)" "|" "CANCEL(c!)" "DONE(d!)")))
(setq org-capture-templates
'(("a" "Appointment" entry
(file+headline denote-journal-path-to-new-or-existing-entry "Appointments")
"* %?\n%^{Appointment}T")
("j" "Journal" entry
(file denote-journal-path-to-new-or-existing-entry) "* %U %?\n%i")
("t" "Task (simple)" entry
(file+headline denote-journal-path-to-new-or-existing-entry "Tasks")
"* TODO %?")))
(with-eval-after-load 'bookmark
(setq bookmark-automatically-show-annotations nil
bookmark-search-delay 0
bookmark-fringe-mark nil)
(add-hook 'bookmark-bmenu-mode-hook #'hl-line-mode))
(setq gnus-select-method '(nnnil "")
gnus-thread-sort-functions
'(gnus-thread-sort-by-number
gnus-thread-sort-by-most-recent-date)
gnus-use-cache t)
(setq gnus-secondary-select-methods
'((nntp "news.gwene.org")
(nnmaildir "michael" (directory "~/Mail/")))
)
(setq epa-file-cache-passphrase-for-symmetric-encryption t)
;; ecomplete for address book
(setq message-mail-alias-type 'ecomplete
message-self-insert-commands nil
message-expand-name-standard-ui t)
(setq smtpmail-smtp-server "foo.bar"
smtpmail-smtp-service f00
send-mail-function 'smtpmail-send-it
smtpmail-stream-type 'ssl
smtpmail-auth-credentials "~/.authinfo.gpg")
;; Gnus Group settings
(setq gnus-group-mode-line-format "%%b")
;; Gnus Article settings
(setq gnus-article-mode-line-format "%G %S %m"
gnus-visible-headers
'("^From:" "^To:" "^Cc:" "^Subject:" "^Newsgroups:" "^Date:"
"Followup-To:" "Reply-To:" "^Organization:" "^X-Newsreader:"
"^X-Mailer:"))
;; Gnus Summary settings
(setq gnus-summary-line-format "%U%R %-18,18&user-date; %4L:%-25,25f %B%s\n"
gnus-summary-mode-line-format "[%U] %p"
gnus-sum-thread-tree-false-root ""
gnus-sum-thread-tree-indent " "
gnus-sum-thread-tree-single-indent ""
gnus-sum-thread-tree-leaf-with-other "+-> "
gnus-sum-thread-tree-root ""
gnus-sum-thread-tree-single-leaf "\\-> "
gnus-sum-thread-tree-vertical "|")
(with-eval-after-load 'gnus
(add-hook 'gnus-group-mode-hook #'hl-line-mode)
(add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
(add-hook 'gnus-summary-mode-hook #'hl-line-mode))
(icomplete-vertical-mode 1)
(marginalia-mode 1)
(define-key global-map (kbd "<f5>") #'modus-themes-toggle)
(define-key global-map (kbd "C-c a") #'org-agenda)
(define-key global-map (kbd "C-c c") #'org-capture)
(define-key global-map (kbd "C-c l") #'org-store-link)
(define-key global-map (kbd "C-c n n") #'denote)
(define-key global-map (kbd "C-c n r") #'denote-rename-file)
(define-key global-map (kbd "C-c n l") #'denote-link)
(define-key global-map (kbd "C-c n b") #'denote-backlinks)
(define-key global-map (kbd "C-c n d") #'denote-dired)
(define-key global-map (kbd "C-c n g") #'denote-grep)
(define-key global-map (kbd "C-c s") #'eshell)
(define-key global-map (kbd "C-x C-b") #'ibuffer)