How to have Emacs auto-refresh all buffers when files have changed on disk?

Dave picture Dave · Sep 26, 2009 · Viewed 33.6k times · Source

I have a non-emacs global search and replace function that causes my disk files to become more up-to-date than my emacs buffers (en masse). Is there any way to tell emacs to refresh all the buffers from disk in one fell swoop, instead of having to do each one individually by reloading the file?

Thanks! D

Answer

Ashwin picture Ashwin · Sep 26, 2009

(global-auto-revert-mode t) in your .emacs.