revert-buffer is often slower than closing an opening the same file.
I've noticed - for example, I can undo to the state of the file before reverting.
While this might be useful in some cases, I would like to clear undo history and load the file as if I'd just opened emacs.
Some possible solutions:
- Disable undo.
- Clear undo history, jump list ... etc.
- Clear the buffer.
- Load the data from the file into the buffer.
- Re-enable undo.
- Store the scroll & cursor position.
- Close the buffer.
- Open the buffer.
- Restore the scroll & cursor position.
While I could write this, it seems like there may be a more elegant solution then writing my own
Does Emacs provide a way to do this already?