Fork me on GitHub
#emacs
<
2022-11-24
>
Benjamin11:11:51

"undo" can "break" for me with some combination of commands sometimes. I always end up undoing with git

Hermann15:11:14

Emacs undo/redo is famous for being able to break unexpectedly (you can see some rant at http://xahlee.info/emacs/emacs/emacs_undo_cult_problem.html ). That is also true for packages like undo-tree. The only thing I have never run into problems with is undo-fu, but I might just have been lucky for some years ;)

hifumi12317:11:19

There's also some package called undo-tree iirc which is very useful because it lets you store an entire tree of changes and even inspect every node of the tree

Benjamin17:11:02

I used undo-tree for quite a while and it also has this issue. Using vundo right now. I suspect the underlying data is cleared. It is interesting that undo-fu worked for years. Maybe I check it

Benjamin17:11:11

buffer-undo-list

Benjamin C20:11:14

I run into this mysteriously from time to time, really curious if you find a solution! I'm really fond of vundo. But sometimes even that can't get it back. On the plus side, I'm learning to commit more often... :P

Benjamin C21:11:19

Back when I was first learning emacs a couple years ago I found this: https://www.reddit.com/r/emacs/comments/mgkbsk/complex_undo_local_history_gif_demo_inside/ I was able to get it to work after some tweaking, and I really like how well it would work when it did, but it there were some annoying problems I was unable to solve with my dismal skills in elisp at the time so I set it aside. I think the idea has a lot of potential, though.

Benjamin08:11:29

yank pop, git commit and for the worst case backup-each-save. Still yea would be nice to at least know what is going on when it breaks.

Hermann09:11:17

I think it's undoing undos when it starts to confuse people and emacs alike...