*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.

holes13
golfers1
keystrokes recorded149

The holes

Transposition Trouble

Two words wandered off during the night. Shepherd them home — the fox insists on correct adjective order.

-UU-:**--  transpose-troublePar 6 · 1 golfer · best 6

Take a Number

The grocer demands an ordered list, with periods. Rectangles were invented for exactly this.

-UU-:**--  take-a-numberPar 11 · 1 golfer · best 11

The Great Reversal

The last shall be first and the first shall be last. Turn the whole thing upside down.

-UU-:**--  great-reversalPar 15 · 1 golfer · best 15

Snake Charmer

This Python refugee is joining a JavaScript codebase. De-snake every identifier before code review.

-UU-:**--  snake-charmerPar 37 · 1 golfer · best 37

Order! Order!

A header file gone feral. Alphabetize the includes before the linter notices.

-UU-:**--  order-orderPar 11 · 1 golfer · best 11

No Comment

Ship it clean: every comment line must go. The code stays exactly where it is.

-UU-:**--  no-commentPar 13 · 1 golfer · best 13

The Ace

One perfect swing. Straighten this run-on line into a tidy 70-column paragraph.

-UU-:**--  the-acePar 1 · 1 golfer · best 1

Cut to Credits

Someone spliced the reel wrong and the ending plays first. Kill it and roll it after the last scene.

-UU-:**--  cut-to-creditsPar 4 · 1 golfer · best 4

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.

-UU-:**--  the-shoutingPar 5 · 1 golfer · best 5

Needle in a Haystack

One misspelling, buried in corporate prose. Search, don’t scroll — then transpose your way to glory.

-UU-:**--  needle-in-haystackPar 7 · 1 golfer · best 7

Twin Cities

The gazetteer got pasted twice, maybe three times. Keep the first visit to each city, drop the reruns.

-UU-:**--  twin-citiesPar 12 · 1 golfer · best 12

Columns of Power

Middle management gets cut: excise the TEMP column and close ranks. Rectangles were invented for this too.

-UU-:**--  columns-of-powerPar 13 · 1 golfer · best 13

The Great Rename

Code review says tmp is not a name. Rechristen every occurrence — query-replace was born for this.

-UU-:**--  great-renamePar 14 · 1 golfer · best 14

How to play

  1. 1 Get the client

    curl -O https://emacsgolf.com/emacsgolf.el

    then, in Emacs: (load "~/path/to/emacsgolf.el") — or drop it on your load-path and (require 'emacsgolf).

  2. 2 Claim your name

    M-x emacsgolf-register

    Pick a golfer name once; the server hands back a token that identifies your submissions from then on. Guard it like a favorite putter.

  3. 3 Pick a hole

    M-x emacsgolf

    Browse 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. 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.