[[!meta title="Beyond Shell History: Saving Compilation Output in Emacs"]] [[!meta copyright="Copyright © 2026 Jonathan Otsuka"]] [[!inline pages="internal(2026/info/compile-nav)" raw="yes"]] # Beyond Shell History: Saving Compilation Output in Emacs Jonathan Otsuka (he/him) - Pronunciation: O-tsu-ka, https://github.com/djgoku/compilation-history [[!inline pages="internal(2026/info/compile-before)" raw="yes"]] I often want to look up a command I ran earlier and see what it printed. Shell history gives me the command, but not its output. Emacs compilation buffers have both, but once the buffer is gone, I need somewhere else to look. I built `compilation-history` to save that information. It stores each compilation in SQLite, including the command, output, exit code, timing, working directory, and Git context. I can search previous runs, reopen their output, and run a command again without having to piece it together from memory or notes. I'll show how I use the package and how it saves and displays previous runs. I'll also show how I use it with AI coding agents. You can use `emacs-mcp-server` or just plain `emacsclient` to have an agent run commands through `compilation-start`. Those commands end up in the same history as my own, so I can go back and check what a test, build, or diagnostic command printed after the agent session is over. About the speaker: Jonathan Otsuka is a software engineer who enjoys working with Emacs Lisp and Elixir. His open-source projects include \`compilation-history\`, \`sops\` for editing encrypted files in Emacs, and, more recently, \`misemacs\`, a tool for creating reproducible, self-contained Emacs builds. away from the keyboard, he enjoys swimming and cycling. [[!inline pages="internal(2026/info/compile-after)" raw="yes"]] [[!inline pages="internal(2026/info/compile-nav)" raw="yes"]]