3
(advice-add #'undo-tree :filter-return #'undo-tree-advice-history-save-file-name)
This advises the function undo-tree, whereas the defadvice form advises undo-tree-make-history-save-file-name. The equivalent advice-add would be
(advice-add 'undo-tree-make-history-save-file-name :filter-return #'undo-tree-advice-history-save-file-name)
2
I like to do two things with undo. I turn off the amalgamation stuff (which by doing so permits undo one keystroke at a time); and, I get rid of the timer (because timers affect performance and drive me absolutely bonkers, unless they are idle-timers).
(when (timerp undo-auto-current-boundary-timer)
(cancel-timer undo-auto-current-boundary-timer))
(...
1
There are two (2) likely suspects:
I. undo-tree-enable-undo-in-region is at its default non-nil setting and the O.P. has an active region; i.e., there are no more available undos in that active region. In such a case, try:
(setq undo-tree-enable-undo-in-region nil)
The above-mentioned setting will also avoid the O.P. encountering a different long-...
1
Emacs is self-documenting in the sense that public variables functions and macros have documentation strings.
You get this string for undo-tree-auto-save-history by typing C-h v undo-tree-auto-save-history RET.
Your question
And is it going to auto-restore the undo-tree when opening a file ?
is answered in the doc-string:
When non-nil, `undo-tree-...
1
This should be mitigated on the current develop branch because those limits were increased by 10X.
When using undo-tree these variables are increased:
undo-limit 800000 ;; previously 80000
undo-strong-limit 12000000 ;; previously 120000
undo-outer-limit 120000000 ;; previously 12000000
The change is at: https://github.com/syl20bnr/spacemacs/commit/...
1
To avoid performance issues, it is not recommended to run undo-tree-update-visualization-buffer on the post-command-hook -- thus, here we use run-with-idle-timer instead. To try this out, place undo-tree.el/elc in the load-path, then paste the following code in a *scratch* buffer and type M-x eval-buffer
(require 'undo-tree)
(defun undo-tree-update-...
1
This is a problem with undo-tree. At the time of this writing there is no workaround nor a fix on the horizon. The last update to the package was August 8, 2013. Apparently no one has a reliable way to even reproduce the problem.
To quote a related SE post:
The author of undo-tree.el, Toby Cubitt, is presently too busy to fix
this particular bug. ...
1
Edit, this is now a package which can be used for undo/redo with evil-mode - undo-fu.
Adding answer to own question since I've been using evil w/o undo-tree for some time now.
This works surprisingly well to undo/redo which wraps emacs undo without anything heavy like undo-tree or redo+.
(global-undo-tree-mode -1)
(defun simple-redo ()
(interactive)
;...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
undo-tree-mode × 32undo × 10
key-bindings × 4
evil × 4
spacemacs × 2
init-file × 2
text-properties × 2
history × 2
magit × 1
package × 1
frames × 1
emacsclient × 1
keymap × 1
customize × 1
package-repositories × 1
help × 1
motion × 1
cursor × 1
advice × 1
prelude × 1
kill-ring × 1
documentation × 1
multiple-cursors × 1
slime × 1
association-lists × 1