I often perform the following workflow:
- Save file I am working on
- Do 'svn update', which pulls update from server and merges in my changes
- Go back into emacs
At this point emacs tells me the file has changed on disc (true), and lets me choose between abandoning my changes, or saving the file I have edited.
I want emacs to automatically reload, but only when I have made no changes to the buffer since I last saved. Is that possible? Alternatively, just give me a way of finding out if I have made any changes since I last saved, as a sanity check.
buffer-modified-p
and if the test is positive,revert-buffer
?