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
(global-auto-revert-mode t)
in your .emacs.Here is an alternative if you are using Emacs GUI (Mine is GNU Emacs 25.1.1 on Windows 7):
If you already have a few files opened, you should see this taken effect instantly. Good luck!
Thanks to @Ashwin for pointing out
(global-auto-revert-mode t)
. I found that Emacs won't automatically update buffers whose files have changed on disk with this change alone. From https://www.gnu.org/software/emacs/manual/html_node/emacs/Reverting.html:After I set
(auto-revert-use-notify nil)
, Emacs did indeed refresh all buffers every 5 seconds.