emacs/undo: increase undo-outer-limit

Was missing a 0 (a typo), which meant it was less than its default
value, thus having the opposite effect and making data loss *more*
likely.

Also got rid of outdated comments; I think those have been around since
the sub-v2.0 days of Doom.
This commit is contained in:
Henrik Lissner 2021-07-12 21:57:44 -04:00
parent edc527bb26
commit cdbd39ba26

View file

@ -4,10 +4,10 @@
:unless (featurep! +tree) :unless (featurep! +tree)
:hook (doom-first-buffer . undo-fu-mode) :hook (doom-first-buffer . undo-fu-mode)
:config :config
;; Store more undo history to prevent loss of data ;; Increase undo history limits to reduce likelihood of data loss
(setq undo-limit 400000 (setq undo-limit 400000 ; 400kb (default is 160kb)
undo-strong-limit 3000000 undo-strong-limit 3000000 ; 3mb (default is 240kb)
undo-outer-limit 3000000) undo-outer-limit 48000000) ; 48mb (default is 24mb)
(define-minor-mode undo-fu-mode (define-minor-mode undo-fu-mode
"Enables `undo-fu' for the current session." "Enables `undo-fu' for the current session."
@ -60,12 +60,14 @@
(setq undo-tree-visualizer-diff t (setq undo-tree-visualizer-diff t
undo-tree-auto-save-history t undo-tree-auto-save-history t
undo-tree-enable-undo-in-region t undo-tree-enable-undo-in-region t
;; Increase undo-limits by a factor of ten to avoid emacs prematurely ;; Increase undo limits to avoid emacs prematurely truncating the undo
;; truncating the undo history and corrupting the tree. See ;; history and corrupting the tree. This is larger than the undo-fu
;; https://github.com/syl20bnr/spacemacs/issues/12110 ;; defaults because undo-tree trees consume exponentially more space,
undo-limit 800000 ;; and then some when `undo-tree-enable-undo-in-region' is involved. See
undo-strong-limit 12000000 ;; syl20bnr/spacemacs#12110
undo-outer-limit 120000000) undo-limit 800000 ; 800kb (default is 160kb)
undo-strong-limit 12000000 ; 12mb (default is 240kb)
undo-outer-limit 128000000) ; 128mb (default is 24mb)
;; Compress undo-tree history files with zstd, if available. File size isn't ;; Compress undo-tree history files with zstd, if available. File size isn't
;; the (only) concern here: the file IO barrier is slow for Emacs to cross; ;; the (only) concern here: the file IO barrier is slow for Emacs to cross;