Gerd Möllmann writes: > Alan Mackenzie writes: > >> I more wonder why those limits are so low. It's a long time since PCs' >> RAM capacity was measured in mere megabytes. > > That, and then the fact that I can produce very long undo list, as long > as they don't exceed the size in bytes limits. And these lists can > contain a lot of markers. > > (defun my-test-undo-list () > (interactive) > (with-current-buffer (get-buffer-create "undo-list-test.txt") > (erase-buffer) > (setf buffer-undo-list nil) > (dotimes (i 1000) > (dotimes (j 10) > (insert "abcd") > (dotimes (i 5) (point-marker)) > (backward-delete-char 1) > (undo-boundary) > (insert "\n"))) > '(igc-collect) > (message "undo-list length %d (%d)" (length buffer-undo-list) n-compacted) > '(kill-buffer (current-buffer)))) > > The above produces an undo list with length 80000. > > I think it might make sense to limit that to some reasonable number. @Oscar: the patch below adds such a variable. My gut feeling is that might well resolve the whole problem, without the other stuff, i.e. applied directly to feature/igc. Sorry for the back and forth.