I'm using undo-tree
with AUCTeX, and I am persisting my undo files like so:
(setq undo-tree-auto-save-history t)
Unfortunately, this regularly results in large (~1MB) undo save files which cause my Emacs to hang when they're loaded. The reason for this is the large number of text-properties that AUCTeX puts on its buffer contents, which bloats the file by orders of magnitude.
Is it safe to remove these properties from the save file, and if so, how can I do so?
undo-tree
, but my reading ofbuffer-undo-list
indicates that text (and therefore text properties) should exist only for deletions, where the car of the entry is the text in question. So you might try using or adapting something like this?(dolist (x buffer-undo-list) (and (consp x) (stringp (car x)) (setcar x (substring-no-properties (car x)))))