From 15f2245b10587f77bc515a452fac1dd6c1f27069 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 9 Jan 2020 03:04:50 -0500 Subject: [PATCH] Install undo-tree 0.7.1 from emacs-straight/undo-tree I re-enable history persistence, now that it has been fixed. Also, I install it from the emacs-straight/undo-tree mirror, which is fast and reliable. Closes #2339, #2334 --- core/core-editor.el | 6 ++++-- core/packages.el | 5 +---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/core-editor.el b/core/core-editor.el index e8efb7a77..ae1f5f2a2 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -527,7 +527,7 @@ files, so we replace calls to `pp' with the much faster `prin1'." :after-call doom-switch-buffer-hook after-find-file :config (setq undo-tree-visualizer-diff t - undo-tree-auto-save-history nil + 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 @@ -558,7 +558,9 @@ files, so we replace calls to `pp' with the much faster `prin1'." (stringp (car item)) (setcar item (substring-no-properties (car item)))))) - ;; Undo-tree is too chatty about saving its history files. + ;; Undo-tree is too chatty about saving its history files. This doesn't + ;; totally suppress it logging to *Messages*, it only stops it from appearing + ;; in the echo-area. (advice-add #'undo-tree-save-history :around #'doom-shut-up-a) (global-undo-tree-mode +1)) diff --git a/core/packages.el b/core/packages.el index 89dda2546..d8bc3c210 100644 --- a/core/packages.el +++ b/core/packages.el @@ -27,10 +27,7 @@ ;; I've created my own mirror for it because git.savannah.gnu.org runs on a ;; potato. :recipe (:host github :repo "hlissner/emacs-so-long")) -(package! undo-tree - ;; Version 0.6.5 is on ELPA which lacks a fix we need, so we install 0.6.6 - ;; from emacsmirror/undo-tree instead. - :recipe (:host github :repo "emacsmirror/undo-tree")) +(package! undo-tree) (package! ws-butler ;; Use my fork of ws-butler, which has a few choice improvements and ;; optimizations (the original has been abandoned).