-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When saving the buffer, change list got emptied. #522
Comments
Original comment by ReneFroger (Bitbucket: ReneFroger, GitHub: ReneFroger): I use Emacs 24.4 in Windows 7 x64, that I didn't have compiled. I use the compiled Emacs 24.4 by Harroogan from this link. |
Original comment by Frank Fischer (Bitbucket: lyro, GitHub: lyro): No, your Emacs version is fine. I wanted you to execute
(the (I'm asking because I cannot reproduce the problem, everything works well for me.) |
Original comment by ReneFroger (Bitbucket: ReneFroger, GitHub: ReneFroger): I couldn't got it working from the command line. But with command But I disabled my custom config, and you're right.. without a config, after saving the buffers, Evil still goes back to the latest change. So it's propably related to my configuration. Thanks for your support, will look further into my setup! |
Original comment by ReneFroger (Bitbucket: ReneFroger, GitHub: ReneFroger): I believe I found the culprit here:
The package Undo Tree was inspired by Vim, with a logical way of undo history. Seems this is incompatible with Evil. But I don't understand one thing. The Vim-like undo tree is already active when I make some changes and go back with Any idea? |
Original comment by ReneFroger (Bitbucket: ReneFroger, GitHub: ReneFroger): |
Original comment by Ivan Brennan (Bitbucket: ivanbrennan, GitHub: ivanbrennan): This is unfortunate, as it's nice to be able to persist your undo history. With undo-tree-auto-save-history set to a non-nil value, saving will trigger undo-tree-save-history. I was able to repro this bug without auto-save by calling undo-tree-save-history directly. Visit a new buffer
Insert text, insert newtext below, return to first line
Save the undo history
Try to go to last change
goto-last-change reports "No further change info" If you inspect buffer-undo-list before and after calling undo-tree-save-history, you'll see it gets cleared out.
I noticed undo-tree-save-history calls undo-list-transfer-to-tree, and that appears to be clearing the undo-list in the process of saving undo info to the tree. I tried the same experiment above and called undo-list-transfer-to-tree instead of undo-tree-save-history and saw the same effect. One thing I still don't understand is why this bug doesn't occur on every call to undo-tree-undo, as that function ends up triggering undo-list-transfer-to-tree as well. |
Is this bug still open? It was surprisingly to see my comments back here from somewhere, thanks for that! |
Why, yes, it is. |
Undo-tree is no longer default after #1360, so closing. |
Originally reported by: ReneFroger (Bitbucket: ReneFroger, GitHub: ReneFroger)
I use Emacs 24.4 in GUI-mode
From the Vim / Evil documentation:
When I save the buffer inside Vim, and then press
g;
, it will go to the latest changed postion.In Evil, after saving a buffer, I press
g;
, which calls the function(goto-last-change ARG)
. But I got the error message that there is no further change info.The text was updated successfully, but these errors were encountered: