Skip to main content

M-x welcome

Emacs

// painted in pixels, signed in commits — and bound to C-x C-s.

Emacs, here

Why Emacs sits at the centre of my workbench, and how this site greets it.

Emacs is the editor I keep coming back to. It is a Lisp machine that happens to render text — every buffer is programmable, every keystroke is a function you can shadow, every workflow can be re-shaped without leaving the program. That is the same impulse this site runs on: software shaped for every platform the hand can reach, painted in pixels, signed in commits.

If you arrived here from M-x eww, the site has noticed and rendered a text-mode mirror for you. No JavaScript, no flexbox tricks — just links, lists, and prose, the way shr likes them.

The other files in this directory are how I actually use Emacs day to day. init.el for the spine of the configuration, packages for the shortlist I would re-install on a new machine, eww-tips for getting more out of the built-in browser, and themes for the palettes that match the rest of this site.

init.el highlights

The handful of settings I would not start a new machine without.

The full file is long. These are the lines I would copy first onto a fresh machine, in roughly the order they go into ~/.emacs.d/init.el.

Sane defaults

(setq inhibit-startup-screen t
      ring-bell-function 'ignore
      use-short-answers t
      sentence-end-double-space nil
      indent-tabs-mode nil
      require-final-newline t
      confirm-kill-emacs #'yes-or-no-p)

(setq backup-directory-alist `(("." . ,(expand-file-name "backups" user-emacs-directory)))
      auto-save-file-name-transforms `((".*" ,(expand-file-name "auto-saves/" user-emacs-directory) t))
      create-lockfiles nil)

Look

(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(global-display-line-numbers-mode 1)
(setq display-line-numbers-type 'relative)
(setq-default fill-column 80)
(global-display-fill-column-indicator-mode 1)

use-package, then everything else

(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(unless (package-installed-p 'use-package)
  (package-refresh-contents)
  (package-install 'use-package))
(setq use-package-always-ensure t)

Project workflow

(use-package vertico   :init (vertico-mode))
(use-package marginalia :init (marginalia-mode))
(use-package consult)
(use-package embark)
(use-package corfu     :init (global-corfu-mode))
(use-package magit     :bind ("C-x g" . magit-status))
(use-package eglot     :hook ((prog-mode . eglot-ensure)))

That stack — vertico + consult + embark + corfu + eglot + magit — is the spine. Everything else is taste.

Packages I actually use

The shortlist that earns its keep on every machine.

Not the shrine of “everything I have ever installed.” The list of packages I would notice the absence of within an hour of starting work.

Editing & navigation

  • vertico — minibuffer completion that stays out of the way.
  • marginalia — annotations next to candidates; cheap context.
  • consultconsult-line, consult-buffer, consult-ripgrep. Fast.
  • embark — act on whatever is at point; the right-click of Emacs.
  • corfu — in-buffer completion, popup style.
  • orderless — completion style that just works with the above.

Languages

  • eglot — built-in LSP since Emacs 29. No config most days.
  • tree-sitter — built-in since 29; smarter highlighting and motion.
  • flymake — built-in linter glue. Pairs with eglot.

Knowledge work

  • org — outlines, capture, agenda, code blocks. The reason many people open Emacs in the first place.
  • denote — Protesilaos Stavrou’s note-taking package. File-based, dependency-free, plays well with org and markdown.
  • org-roam — for those who want a Zettelkasten with a graph.

Plumbing

  • magit — the best Git porcelain on any platform. C-x g.
  • vterm — a real terminal emulator inside Emacs.
  • dired-x — built-in; the file manager I keep wishing the OS shipped.

Reading

  • eww — built-in browser. This site is tuned for it.
  • elfeed — RSS reader; pairs nicely with denote for capture.
  • nov.el — read EPUBs in Emacs.

Reading the web in EWW

Practical settings that make the built-in browser pleasant for daily use.

M-x eww is the built-in Emacs browser. It is not Chrome, but for a huge slice of the open web it is faster, quieter, and better behaved.

Open this site

M-x eww RET https://jpfchang.org RET

The middleware here notices the Emacs user-agent and serves a text-mode mirror of every page that would otherwise need JavaScript (the terminal, the games). You should be able to navigate the whole site without leaving Emacs.

Settings worth setting

(setq shr-use-fonts nil)              ; uniform monospace, no resizing
(setq shr-use-colors t)               ; let pages tint themselves
(setq shr-folding-mode t)             ; fold long lines
(setq shr-bullet "• ")
(setq eww-search-prefix "https://html.duckduckgo.com/html/?q=")
(setq browse-url-browser-function 'eww-browse-url)

Bindings I rely on

  • g — refresh the page.
  • G — start a new search.
  • R — readable mode (strips chrome, keeps text).
  • & — open in the system browser if EWW gives up.
  • d — download the link at point.
  • B / H — bookmarks, history.

When EWW falls over

EWW won’t render JavaScript-only pages. When that happens here, look for a banner saying you’ve hit the text-mode view — the same content should be linked from there as plain HTML. If a page truly needs JS, hit & to hand it off to your system browser.

Themes that match this site

Modus Operandi and Modus Vivendi, available in this terminal too.

The two themes I trust on every screen — including this one — are Modus Operandi (light) and Modus Vivendi (dark), maintained by Protesilaos Stavrou. They are designed to meet WCAG AAA contrast, which is the same bar the rest of this site is held to.

In Emacs

Both ship with Emacs since version 28:

(load-theme 'modus-operandi t)   ; light
;; or
(load-theme 'modus-vivendi t)    ; dark

;; Toggle without re-loading:
(global-set-key (kbd "<f5>") #'modus-themes-toggle)

In this terminal

Type one of these in the /terminal:

theme modus-operandi
theme modus-vivendi

The terminal repaints in place; the preference is stored in localStorage and survives reload.

Why these and not the others

Modus is built around contrast first, accent second. Most “pretty” themes invert that order and lose readability when you’re tired or the room is bright. After a few weeks on Modus, every other theme looks like it’s whispering.