(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)
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)
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-...
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.
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-...
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/...
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
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. ...
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+.
(defun simple-redo ()