Reputation: 2186
If I want to reload from disk a file that is in a buffer, I can do M-x revert-buffer
. Is there an equivalent command that will do this for all open buffers at once?
Upvotes: 1
Views: 460
Reputation: 32426
You could use the following simple function,
(defun my-revert-all ()
(interactive)
(dolist (buff (buffer-list))
(ignore-errors ; ignore errors from buffers w/ no files
(revert-buffer buff))))
which could be modified further to pass all the arguments similar to revert-buffer
.
Upvotes: 1