Skip to content

Instantly share code, notes, and snippets.

View samwhitlock's full-sized avatar

Sam Whitlock samwhitlock

View GitHub Profile
@samwhitlock
samwhitlock / auto-revert.el
Created December 3, 2020 07:56
Simple way to auto-revert in dired
(defun quiet-auto-revert ()
"A hook to run for buffers you want to revert automatically and silently"
(auto-revert-mode 1)
(setq-local auto-revert-verbose nil))
;; you can also make auto-revert-verbose nil globally, but I like to avoid global changes if I can
(add-hook 'dired-mode-hook #'quiet-auto-revert t nil)
;; you can add this to any other mode's hook, as it will be compatible