Bob is likely referring to the
undo-browse.el package. According to the package's
In ub terminology, the undo-history is seen as a movie, each step
being a frame of the movie. You can play (back/forth) the color-coded
movie-history of your document, or manually go back and forth, and
revert your document to the frame you like.
A little history...
undo-browse.el package is written by Deepak Goel whose name disappears from the Internet record around 2012. This is back in the Emacs 21 days, before ELPA became the standard. Deepak seems to have been quite active in the Emacs community and published a lot of Emacs lisp in the early 2000's. Unfortunately, it looks like
undo-browse, along with his many other packages, were never published to ELPA, MELPA, or Marmalade. His webpage is down and many links to his packages are now dead. I suspect his work is mostly forgotten because of this.
Clean Code was first published in 2009, before Deepak's disappearance. His packages would still have been available then. This leads me to believe Bob was using
undo-browse nowadays is a little tricky. Its implementation is...unconventional. I haven't had much luck getting it to work as described.
Here are a few ways to achieve playback-like behavior using more recent packages:
You ought to be able to achieve the same result, at least in spirit, with the default
undo command (typically bound to
C-/ until there is nothing left to undo. Then, press
C-f. Now press
C-/ repeatedly to redo.
The undo/redo will appear "chunky". This is because
undo tracks "inserts" and not individual commands. For a detailed explanation of how
undo works, see the Reddit post "How Emacs Undo Works".
You can achieve a fine-grain undo with
undo-tree. User lawlist1 provides code that modifies the default to provide key-for-key undo:
(when (timerp undo-auto-current-boundary-timer)
(lambda () (add-to-list 'undo-auto--undoably-changed-buffers (current-buffer))))
(fset 'undo-auto-amalgamate 'ignore)
This will undo/redo character insertions, copy/paste, etc. You can navigate these easily with
undo-tree doesn't record movements. It only tracks changes.
The section quoted looks a lot like what displays in
C-h l runs
view-lossage which shows the last 300 commands. Keystrokes can also be logged in raw form to a "dribble" file using
(open-dribble-file FILE). I'm not aware of a way to "play back" lossage or a dribble, however.
Seeing which commands are most frequently used, the point Bob is emphasizing with his anecdote, can be achieved with keyfreq. Bin Chen's "How to be extremely efficient in Emacs" demonstrates its usage.
1If you like lawlist's snippet, give the post an upvote!