doomemacs/modules/emacs/undo
Henrik Lissner 6c0881c684
nit: revise TODO/FIXME/HACK/REVIEW/etc in comments
Some were outdated, some were incorrectly labeled, others were already
completed, some were missing... Gotta fix them all.

Also, in :ui hl-todo, there are comments that describe how Doom uses
each of these annotations; those have been updated.
2026-03-02 19:45:09 -05:00
..
.doommodule feat: add .doommodule files 2024-09-14 20:47:39 -04:00
config.el nit: revise TODO/FIXME/HACK/REVIEW/etc in comments 2026-03-02 19:45:09 -05:00
doctor.el docs(undo): doctor: check for other undo package 2025-04-05 02:00:12 -04:00
packages.el bump: :app :config :editor :emacs :email :input 2026-03-02 01:44:27 -05:00
README.org docs: discourage after! and use-package! use 2026-02-09 04:29:47 -05:00

:emacs undo

Description   unfold

This module augments Emacs' built-in undo system to be more intuitive and to persist across Emacs sessions.

Module flags

+tree
Uses doom-package:undo-tree instead of doom-package:undo-fu, which is a little less stable, but offers branching undo history and a visualizer for navigating it.

Hacks

  • Both undo-fu and undo-tree have been modified to use zstd to compress undo history if it is available.
  • undo-tree only

    • Text properties are stripped from undo history to shrink it.
    • Undo-tree is too chatty about saving its history files. This has be "silenced". i.e. It's visible in \*Messages\*, but won't appear in your minibuffer.
  • undo-fu only

    • Doom defines undo-fu-mode to make it easier to add hooks/mode-local keybinds.

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

This module has no external requirements.

TODO Usage

󱌣 This module has no usage documentation yet. Write some?

TODO Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

Disabling persistent undo history

  • If you are using doom-module:+tree:

    (with-eval-after-load 'undo-tree
      (setq undo-tree-auto-save-history nil))
  • If you aren't:

    (remove-hook 'undo-fu-mode-hook #'global-undo-fu-session-mode)

Troubleshooting

Report an issue?

undo-tree

  • Has been known to truncate undo history unpredictably, due to Emacs' undo cleanup imposing linear undo limits on non-linear undo tree data. Doom already sets undo-limit, undo-strong-limit, and undo-outer-limit absurdly high to mitigate this somewhat.

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?