Function: doc-view-revert-buffer

doc-view-revert-buffer is a and interactive for revert-buffer, defined in files.el.gz.

This command is obsolete since 27.1; use revert-buffer instead.

Signature

(doc-view-revert-buffer &optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)

Documentation

Replace current buffer text with the text of the visited file on disk.

This undoes all changes since the file was visited or saved. With a prefix argument, offer to revert from latest auto-save file, if that is more recent than the visited file.

This command also implements an interface for special buffers that contain text that doesn't come from a file, but reflects some other data instead (e.g. Dired buffers, buffer-list buffers). This is done via the variable revert-buffer-function. In these cases, it should reconstruct the buffer contents from the appropriate data.

When called from Lisp, the first argument is IGNORE-AUTO; offer to revert from the auto-save file only when this is nil. Note that the sense of this argument is the reverse of the prefix argument, for the sake of backward compatibility. IGNORE-AUTO is optional, defaulting to nil.

Optional second argument NOCONFIRM means don't ask for confirmation at all. (The variable revert-without-query offers another way to revert buffers without querying for confirmation.)

Optional third argument PRESERVE-MODES non-nil means don't alter the files modes. Normally we reinitialize them using normal-mode.

This function binds revert-buffer-in-progress-p non-nil while it operates.

This function calls the function that revert-buffer-function specifies to do the work, with arguments IGNORE-AUTO and NOCONFIRM. The default function runs the hooks before-revert-hook and after-revert-hook

Reverting a buffer will try to preserve markers in the buffer, but it cannot always preserve all of them. For better results, use revert-buffer-with-fine-grain, which tries harder to preserve markers and overlays, at the price of being slower.

Key Bindings

Aliases

package-menu-refresh (obsolete since 27.1) doc-view-revert-buffer (obsolete since 27.1)