Variable: dired-auto-revert-buffer

dired-auto-revert-buffer is a customizable variable defined in dired.el.gz.

Value

nil

Documentation

Automatically revert Dired buffers on revisiting their directory.

This option controls whether to refresh the directory listing in a Dired buffer when the directory that is already in some Dired buffer is revisited by commands such as C-x d (dired) and M-x dired-find-file (dired-find-file). If the value is t, revisiting an existing Dired buffer always reverts it. If the value is a function, it is called with the directory name as a single argument, and the buffer is reverted if the function returns non-nil. One such function is dired-directory-changed-p, which returns non-nil if the directory has been changed since it was last revisited. Otherwise, Emacs prompts whether to revert the changed Dired buffer. Note that this is not the same as auto-revert-mode(var)/auto-revert-mode(fun) that periodically reverts at specified time intervals.

This variable was added, or its default value changed, in Emacs 23.2.

View in manual

Probably introduced at or before Emacs version 23.2.

Source Code

;; Defined in /usr/src/emacs/lisp/dired.el.gz
(defcustom dired-auto-revert-buffer nil
  "Automatically revert Dired buffers on revisiting their directory.
This option controls whether to refresh the directory listing in a
Dired buffer when the directory that is already in some Dired buffer
is revisited by commands such as \\[dired] and \\[dired-find-file].
If the value is t, revisiting an existing Dired buffer always reverts it.
If the value is a function, it is called with the directory name as a
single argument, and the buffer is reverted if the function returns non-nil.
One such function is `dired-directory-changed-p', which returns non-nil
if the directory has been changed since it was last revisited.
Otherwise, Emacs prompts whether to revert the changed Dired buffer.
Note that this is not the same as `auto-revert-mode' that
periodically reverts at specified time intervals."
  :type '(choice
          (const :tag "Don't revert" nil)
          (const :tag "Always revert visited Dired buffer" t)
          (const :tag "Revert changed Dired buffer" dired-directory-changed-p)
          (function :tag "Predicate function"))
  :group 'dired
  :version "23.2")