1

I often perform the following workflow:

  1. Save file I am working on
  2. Do 'svn update', which pulls update from server and merges in my changes
  3. 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.

1
  • How about using buffer-modified-p and if the test is positive, revert-buffer ?
    – lawlist
    Feb 4, 2014 at 17:21

1 Answer 1

2

Should work if you put this in your .emacs:

(global-auto-revert-mode 1)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .