Sometimes I launch dired, then rename a file, or add a new file, and dired doesn't see the changes until I relaunch Emacs. Is there a way to configure dired to refresh itself more quickly, either through polling or file system hooks?

  • 8
    Use revert-buffer. Default binding g. – KAction Mar 16 '13 at 20:48
  • 1
    @KAction Upvote. Very useful, but not automatic. – mcandre Mar 17 '13 at 22:40

Add a hook.

;; Auto-refresh dired on file change
(add-hook 'dired-mode-hook 'auto-revert-mode)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.