vundo shows the Emacs undo tree and lets you walk it
Visualize the undo tree.
At a glance
- What is it?
- vundo is an Emacs package that draws the undo history as a tree and lets you move through it to reach previous buffer states, with diffs between arbitrary nodes and a popup mode that shows the tree while you undo. It is a small Emacs Lisp package that now lives on ELPA, requires Emacs 28, and the repository records no licence.
- Who is it for?
- Adopt vundo if you use Emacs heavily and keep losing the shape of your undo history, especially if you take branches in a buffer and want to compare two arbitrary states rather than only stepping back one change at a time.
- Can I use it commercially?
- Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
- Is it still maintained?
- Yes. The repository last received commits 48 days ago.
- What is it written in?
- Mainly Emacs Lisp, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.
Editorial analysis
A tree buffer instead of a linear undo list
Emacs records more undo history than most editors expose, and vundo is built around the idea that the history should be visible as a shape rather than a single stack. It displays the undo history as a tree and lets you move in the tree to go back to previous buffer states.
The entry point is a command. You type M-x vundo RET in the buffer you want to undo, and an undo tree buffer pops up. From there the tree is navigated with single letter keys. f goes forward, b goes backward, e goes to the end or tip of the branch, and l goes to the last saved node, with r going to the next saved node. There are also keys to mark a node, unmark it, show a diff, and quit, and C-g quits as well.
The branch structure is not incidental, it is the point. In a buffer where you have typed something, undone it and typed something else, the old edit is not lost, it sits on a side branch. vundo makes that visible and reachable, which is exactly the case where a linear undo command leaves the user with no way back.
The readme also notes that vundo does not need to be turned on all the time and does not replace the undo commands the way undo-tree does, which makes it a lighter addition to an existing configuration.
Why n and p do not behave the way you expect
Two of the keys need more explanation, and the readme spends a paragraph on them. n goes to the node below when at a branch point, and p goes to the node above. The catch is that they only work between nodes that share a parent.
The diagram in the readme shows two branches hanging off a common trunk, with the nodes labelled A and C on the upper branch and B and D on the lower one. n and p can move between A and B because they share a parent, which means you are at a branching point, but they cannot move between C and D. The branches you can switch between are highlighted in bold face.
So the mental model is not a list with up and down arrows. It is a tree where you can only step onto a sibling branch at a point where the branches actually diverge. If you are further down a branch, moving to the other branch means walking back to the divergence point first.
The readme also mentions that the key to go back to the last branching point, and the key to go forward to the next branching point, exist for exactly this reason. They are the navigation primitive, and n and p are the fine grained movement within a branch.
RET commits, q rolls back
Moving around the tree does not change the buffer while you browse. You press RET to commit the change and return to the buffer. If instead you quit with q or C-g, the changes made by vundo are rolled back.
That rollback behaviour is configurable. The option vundo-roll-back-on-quit can be set to nil to disable it, which means a quit leaves whatever state you had navigated to in place.
The default is the safer arrangement. Exploring the history is a read only operation until you commit, so a stray keypress cannot leave the buffer in a state you did not intend. It also means the tree view never silently rewrites the file, which matters when you are trying to work out what happened rather than trying to change something.
The saved states are shown in the tree as well. Nodes that have been saved to disk appear in green, and the last saved node is emphasised in bold, with l to jump to the last saved node and r to go to the next one. That gives you a visual anchor for where the file on disk differs from the state you are looking at.
Diffing any two states, not just neighbours
The diff feature is what separates vundo from a plain tree viewer. Vundo uses Emacs facilities to provide diffs among arbitrary undo states. You mark a node with m, and then press d to show a diff between the marked node, or the parent, and the current node. u unmarks the marked node.
The readme is explicit that the diff window is buried by default when vundo quits, and that vundo-diff-quit controls the other options, so the behaviour of that window on exit is a setting rather than a fixed choice.
There is also a terminal specific fix in the readme. Terminal users may encounter unwanted control characters in the diff output, because Emacs colours diff buffers itself. The remedy is to instruct diff not to print colour codes:
(setq diff-switches "-u --color=never")That is a small detail with a real effect on the target user of this package. If your diffs come out as garbage in a terminal, this is the fix, and it is the kind of thing that would otherwise cost an afternoon.
Popup mode shows the tree while you undo
The newest feature in the package is vundo-popup-mode, introduced in version 2.4.0 on 2025-03-14. When it is enabled, the vundo window is displayed in the background automatically every time you invoke an undo or redo command, and the popup window is killed after a timeout that defaults to three seconds.
The trick is that the popup is not modal. You can switch to the vundo buffer simply by moving point into it before it is killed. So the intended workflow is to hit undo, glance at the tree that appears behind the buffer, and either move into it to explore or ignore it and carry on.
That is a different model from invoking vundo explicitly, where the tree takes over the screen. The popup is ambient context, the explicit invocation is a workspace. Both exist in the same package, which is a reasonable design for people whose undo habits differ between quick editing and deliberate recovery.
Version 2.3.0 added the ability to move among all saved nodes and the automatic burying of the diff window, and 2.2.0 introduced the diff feature along with an improvement in tree drawing speed.
Faces and Unicode glyphs for the tree drawing
The tree is drawn with text, and both the glyphs and the faces are customisable. The package ships six faces: vundo-default, vundo-node, vundo-stem, vundo-highlight, vundo-saved and vundo-last-saved. The last two correspond to the saved and last saved node highlighting described earlier.
The glyph set is a variable. By default the drawing is in ASCII mode, and the changelog records that the ASCII layout was redrawn in 2022, before version 1.0.0, drawing o--o--o with a backtick branch and an x tip rather than a plus and a star. If you would rather have the prettier Unicode characters, set the glyph alist:
(setq vundo-glyph-alist vundo-unicode-symbols)The readme is honest about the cost. Your default font has to contain those Unicode characters or they look terrible and do not align. The suggested fix is to pick a font that covers them, such as FiraCode Nerd Font or Unifont, and point the vundo-default face at it:
(set-face-attribute 'vundo-default nil
:font "FiraCode Nerd Font Mono"
:family "FireCode Nerd Font")This is a nice illustration of a general point about terminal Emacs. Anything that draws a diagram has to accept that the font is the user's choice, so the package ships both an ASCII fallback and a way to hook in a Nerd Font.
How vundo differs from undo-tree
The readme has a short section comparing vundo with undo-tree, and it is worth quoting the substance. Vundo does not need to be turned on all the time, nor does it replace the undo commands the way undo-tree does. Vundo displays the tree horizontally, whereas undo-tree displays a tree vertically. Diff is provided on demand between any nodes in vundo.
So the difference in approach is presentation and activation rather than capability. undo-tree is a mode that takes over the undo behaviour and shows its tree inline in the buffer, vertically. vundo is a separate view you open when you want it, drawn horizontally in its own buffer, and it leaves the ordinary undo commands alone.
That difference determines who should use which. If you like to see your history in the buffer as you work, undo-tree fits. If you prefer your buffer unchanged and want a dedicated pane when you need to dig into history, vundo fits.
Two more practical notes. Vundo is now available on ELPA, which removes the need to install from a source checkout. And the readme states that vundo.el requires Emacs 28, so an older Emacs is out of scope.
Tests, releases and a missing licence
The package ships its tests, and the readme explains how to run them. Interactively you load test/vundo-test.el and run M-x ert RET t RET. In batch mode the command is:
emacs --batch \
-l vundo.el \
-l test/vundo-test.el \
-f ert-run-tests-batch-and-exitUsing ert, the Emacs Lisp testing framework, for a package this size is a good sign, and having a batch command means the tests can be wired into a continuous integration job without a human in the loop.
The repository is small and flat. The top level holds vundo.el, vundo-diff.el and vundo-popup.el, so the diff and popup features are separate files rather than one large file, plus a test/ directory, NEWS.txt with the full changelog and README.txt. The readme is the documentation, and there is no separate documentation site.
The release history shows regular tagged versions: v2.5.0 on 2026-09-05, v2.4.0 on 2025-03-15 and v2.2.0 on 2024-01-01, with the last push on 2026-09-05 and the repository not archived. One gap deserves a note: the project listing records the licence as unknown and the top level entries contain no licence file, so the terms for reusing the code are not stated in the repository. Anyone copying this code into a configuration they distribute should ask the author first.
Editorial conclusion
Adopt vundo if you use Emacs heavily and keep losing the shape of your undo history, especially if you take branches in a buffer and want to compare two arbitrary states rather than only stepping back one change at a time. Skip it if you never branch your edits, since the tree view adds little for a linear history, and note that the package requires Emacs 28 or later and that the repository records no licence, so check with the author before redistributing it inside your own configuration. Before you adopt it, read the comparison section in the readme against undo-tree, and run the batch test command to confirm the package works with your Emacs build.
Frequently asked questions
How do I open the undo tree in vundo?
Type M-x vundo RET in the buffer you want to undo, and an undo tree buffer pops up. Movement uses single letter keys, for example f to go forward, b to go backward and e to go to the tip of the branch.
What does RET do in the vundo tree, and what happens on quit?
By default you press RET to commit the change and return to the buffer. If you quit with q or C-g instead, the changes made by vundo are rolled back, and setting vundo-roll-back-on-quit to nil disables that behaviour.
How do I diff two different undo states in vundo?
Mark a node with m and press d to show a diff between the marked node, or the parent, and the current node, and u unmarks it. The diff window is buried by default when vundo quits, and vundo-diff-quit controls that.
What is vundo-popup-mode?
When it is enabled, the vundo window appears in the background every time you invoke undo or redo, and it is killed after a timeout that defaults to three seconds. You can switch to it by moving point into it before it is killed. The feature was added in version 2.4.0.
How does vundo compare with undo-tree?
According to the readme, vundo does not need to be turned on all the time and does not replace the undo commands the way undo-tree does. Vundo draws the tree horizontally in its own buffer, undo-tree draws a vertical tree in the buffer, and vundo provides diffs between any nodes on demand.
Which Emacs version does vundo require and how do I run its tests?
The readme states that vundo.el requires Emacs 28, and vundo is now available on ELPA. The tests live in test/vundo-test.el and can be run in batch mode with emacs --batch -l vundo.el -l test/vundo-test.el -f ert-run-tests-batch-and-exit.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/casouri-vundo)Was this useful?