ShannonMax: A Library to Optimize Emacs Keybindings with Information Theory

Emacs fans split: math hacks your shortcuts or just learn ’em

TLDR: ShannonMax uses math to log how you use Emacs and suggests shorter, faster shortcuts. Commenters split between wanting it system-wide, sticking to tab-completion, and worrying about keylogging—highlighting a bigger fight over whether smarter shortcuts or simpler habits actually save your fingers.

Emacs got a wild new toy: ShannonMax, a keybinding optimizer that uses information theory—the math behind data compression—to figure out which shortcuts should be shorter, and which can be longer. Yes, it logs your keystrokes (with a big “be careful” warning), then suggests faster combos. The vibe? Equal parts brainy and chaotic. The GitHub link dropped and the comment section turned into a keyboard war.

One camp is dreaming big: lorenzohess immediately asked if this could jump from Emacs into tiling window managers (those super-organized desktops for power users), basically begging for a world where math optimizes everything you press. Another camp, led by Jeff_Brown, shrugged and said: why stress over shortcuts when you can just hit “M-x” (that’s Emacs’ command mode) and tab-complete your way through life? Meanwhile, the hardware heads chimed in—tra3 is deep in Corne split keyboard territory and wants this for the entire operating system, not just Emacs.

Drama highlights: privacy jokes about the keylogger (“Don’t log your bank password, folks”), debates over whether math can really fix your muscle memory, and memey takes about “finger yoga” like C-x C-s. The original talk is on YouTube, and the community is torn between becoming shortcut minimalists or staying tab-completion maximalists. Either way, entropy is the new ergonomics.

Key Points

  • ShannonMax analyzes Emacs key usage with information theory to suggest more efficient keybindings.
  • Installation requires shannon-max.el and a standalone Java JAR, with JVM available and the JAR made executable.
  • Users log keystrokes via shannon-max-start-logger and run M-x shannon-max-analyze to view optimization recommendations.
  • The tool compares actual keybinding lengths to theoretical lengths, prioritizing shorter bindings for frequently used commands.
  • Customization includes defining a keypress cost function and adjusting alphabet size, with a reference to entropy calculations for correct settings.

Hottest takes

"generalize this program to tiling window managers?" — lorenzohess
"I use way, way more commands than I know the shortcut for" — Jeff_Brown
"similar tools for the OS as a whole?" — tra3
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.