[emacs] adjust my preferred undo mechanism
authorAmin Bandali <amin@aminb.org>
Sun, 22 Jul 2018 22:51:32 +0000 (18:51 -0400)
committerAmin Bandali <amin@aminb.org>
Sun, 22 Jul 2018 22:51:32 +0000 (18:51 -0400)
have undo tree save history, and leave emacs' undo intact, for cases
when undo tree's history gets corrupt at least i'd have functioning
undo for the changes i made in the current session

init.org

index a345921..d171fdf 100644 (file)
--- a/init.org
+++ b/init.org
@@ -627,6 +627,7 @@ Roll your own modal mode
    ("n" next-line)
    ("p" previous-line)
    ("f" forward-char)
    ("n" next-line)
    ("p" previous-line)
    ("f" forward-char)
+   ("/" undo)
    ("SPC" (("b" (("b" ibuffer-list-buffers)
                  ("k" kill-this-buffer)
                  ("o" other-window)
    ("SPC" (("b" (("b" ibuffer-list-buffers)
                  ("k" kill-this-buffer)
                  ("o" other-window)
@@ -848,13 +849,14 @@ TODO: break this giant source block down into individual org sections.
 
 (use-package undo-tree
   :ryo
 
 (use-package undo-tree
   :ryo
-  ("/" undo-tree-undo)
+  ("?" undo-tree-undo)
   ("_" undo-tree-redo)
   ("_" undo-tree-redo)
-  :bind (("C-/" . undo-tree-undo)
+  :bind (("C-?" . undo-tree-undo)
          ("M-_" . undo-tree-redo))
   :config
   (global-undo-tree-mode)
          ("M-_" . undo-tree-redo))
   :config
   (global-undo-tree-mode)
-  (setq undo-tree-mode-lighter ""))
+  (setq undo-tree-mode-lighter ""
+        undo-tree-auto-save-history t))
 #+end_src
 
 * Editing
 #+end_src
 
 * Editing