Experimental fixes for undo-tree

Increase `undo-limit`, `undo-strong-limit` and `undo-outer-limit` by a
factor of ten, which should prevent emacs from prematurely truncating
the undo history and corrupting the tree.

Restore `undo-tree-auto-save-history` which was disabled to avoid
exacerbating the undo history truncation.

Change the `undo-tree` recipe to grab the latest version from the
maintainer's repostiory instead of the outdated ELPA version.

Restore `undo-tree-enable-undo-in-region` which should be fixed in the
latest version of `undo-tree`.
This commit is contained in:
Andrew Whatson 2019-10-01 22:37:18 +10:00
parent 3f7e0fd103
commit aa087e3af2
2 changed files with 11 additions and 6 deletions

View file

@ -409,11 +409,13 @@ files, so we replace calls to `pp' with the much faster `prin1'."
;; Branching & persistent undo
:after-call doom-switch-buffer-hook after-find-file
:config
(setq undo-tree-auto-save-history nil ; disable because unstable
;; undo-in-region is known to cause undo history corruption, which can
;; be very destructive! Disabling it deters the error, but does not fix
;; it entirely!
undo-tree-enable-undo-in-region nil
(setq undo-tree-auto-save-history t
;; Increase undo-limits by a factor of ten to avoid emacs prematurely
;; truncating the undo history and corrupting the tree. See
;; https://github.com/syl20bnr/spacemacs/issues/12110
undo-limit 800000
undo-strong-limit 12000000
undo-outer-limit 120000000
undo-tree-history-directory-alist
`(("." . ,(concat doom-cache-dir "undo-tree-hist/"))))