*emacsgolf*
Every keystroke counts. Literally.
Given a start buffer and a target buffer, hole out in as few keystrokes as possible. Real Emacs, real keybindings, real shame when someone does it in half your score. What vimgolf is to Vim — for the church of Emacs.
The holes
Transposition Trouble
Two words wandered off during the night. Shepherd them home — the fox insists on correct adjective order.
Take a Number
The grocer demands an ordered list, with periods. Rectangles were invented for exactly this.
The Great Reversal
The last shall be first and the first shall be last. Turn the whole thing upside down.
Snake Charmer
This Python refugee is joining a JavaScript codebase. De-snake every identifier before code review.
Order! Order!
A header file gone feral. Alphabetize the includes before the linter notices.
No Comment
Ship it clean: every comment line must go. The code stays exactly where it is.
The Ace
One perfect swing. Straighten this run-on line into a tidy 70-column paragraph.
Cut to Credits
Someone spliced the reel wrong and the ending plays first. Kill it and roll it after the last scene.
The Shouting
HR has asked that the printer memo be resubmitted in a calmer register. Mind the safety on this club — the fairway is stock Emacs.
Needle in a Haystack
One misspelling, buried in corporate prose. Search, don’t scroll — then transpose your way to glory.
Twin Cities
The gazetteer got pasted twice, maybe three times. Keep the first visit to each city, drop the reruns.
Columns of Power
Middle management gets cut: excise the TEMP column and close ranks. Rectangles were invented for this too.
The Great Rename
Code review says tmp is not a name. Rechristen every occurrence — query-replace was born for this.
How to play
-
1 Get the client
curl -O https://emacsgolf.com/emacsgolf.el
then, in Emacs:
(load "~/path/to/emacsgolf.el")— or drop it on yourload-pathand(require 'emacsgolf). -
2 Claim your name
M-x emacsgolf-registerPick a golfer name once; the server hands back a token that identifies your submissions from then on. Guard it like a favorite putter.
-
3 Pick a hole
M-x emacsgolfBrowse the course, hit RET on a hole. You get the start buffer on the left, the target on the right, and a running keystroke meter in the mode line.
-
4 Hole out
C-c C-c
when your buffer matches the target. Every keystroke from tee-off to C-c C-c counts — including M-x, minibuffer typing, and that C-g you'll regret. Submit, and enter the leaderboard.
Scores are verified by replaying your keystrokes in vanilla
emacs -Q on the server — the fairway is stock Emacs, so custom keybindings
won't survive the replay (and neither, for now, do keyboard-macro definitions).
Entries marked † were accepted without replay.
In-game keys: C-c C-c check & submit · C-c C-d diff against target ·
C-c C-r mulligan · C-c C-k walk off the course.