;; Time-stamp: <2025-02-19 10h42 GMT (anker)> (defun revert-all-file-buffers () "Refresh all open file buffers without confirmation" (interactive) (dolist (buf (buffer-list)) (let ((filename (buffer-file-name buf))) (when (and filename (not (buffer-modified-p buf))) (if (file-readable-p filename) (with-current-buffer buf (revert-buffer :ignore-auto :noconfirm :preserve-modes)) (let (kill-buffer-query-functions) (kill-buffer buf) (message "Killed non-existing/unreadable file bufffer: %s" filename)))))) (message "Finished reverting buffers containing unmodified files.")) (require 'project) (setq project-vc-extra-root-markers '("Cargo.toml"))