From b12944fddb8382979c8f15631491c94edaf7f6cb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 3 Aug 2018 18:25:24 +0200 Subject: [PATCH] undo-tree-auto-save-history = t Persistent undo history is great. I'm hoping that, with undo-tree-enable-undo-in-region disabled, we can enable this feature again safely. Time will tell. --- core/core-editor.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index b39230c5b..0a35f5e36 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -212,13 +212,13 @@ savehist file." (def-package! undo-tree :after-call (doom-exit-buffer-hook after-find-file) :config - ;; persistent undo history and 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! - (setq undo-tree-auto-save-history nil + (setq undo-tree-auto-save-history t + ;; 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 undo-tree-history-directory-alist - (list (cons "." (concat doom-cache-dir "undo-tree-hist/")))) + `(("." . ,(concat doom-cache-dir "undo-tree-hist/")))) (global-undo-tree-mode +1))