Here is an with-undo-collapse macro that uses Emacs-26 change-groups feature.
This is atomic-change-group with a one line change, adding undo-amalgamate-change-group.
It has the advantages that:
It doesn't need to manipulate the undo data directly.
It ensures undo data isn't truncated.
(defmacro with-undo-collapse (&rest body)
"Like `progn' but ...
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/...
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 ()