From 2e25989dc5fb6e6050039b04a4a3ed0717d7e636 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sat, 28 Jul 2018 01:04:49 +0200 Subject: [PATCH] undo-tree-enable-undo-in-region = nil Try to save off the elusive and annoying "unrecognized entry in undo list undo-tree-canary" error produced by undo-tree. --- core/core-editor.el | 6 ++++-- modules/config/default/+bindings.el | 4 ---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index b6e92e3a6..b6f4a9961 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -183,9 +183,11 @@ fundamental-mode) for performance sake." (def-package! undo-tree :after-call (doom-exit-buffer-hook after-find-file) :config - ;; persistent undo history is known to cause undo history corruption, which - ;; can be very destructive! So disable it! + ;; 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 + undo-tree-enable-undo-in-region nil undo-tree-history-directory-alist (list (cons "." (concat doom-cache-dir "undo-tree-hist/")))) (global-undo-tree-mode +1)) diff --git a/modules/config/default/+bindings.el b/modules/config/default/+bindings.el index 631d091b6..6b544743f 100644 --- a/modules/config/default/+bindings.el +++ b/modules/config/default/+bindings.el @@ -425,10 +425,6 @@ (:map swiper-map [backtab] #'+ivy/wgrep-occur)) - ;; undo-tree -- undo/redo for visual regions - :v "C-u" #'undo-tree-undo - :v "C-r" #'undo-tree-redo - ;; yasnippet (:after yasnippet (:map yas-keymap