[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re-reading of a buffer

From: Peter Lee
Subject: Re: Re-reading of a buffer
Date: Thu, 11 Sep 2003 05:02:16 GMT
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (windows-nt)

>>>> Brian Poole writes:

    Brian> How do you re-read a changed buffer from disk?  Thanks

,----[ C-h f revert-buffer RET ]
| revert-buffer is an interactive compiled Lisp function in `files'.
| It is bound to <menu-bar> <files> <revert-buffer>.
| (revert-buffer &optional IGNORE-AUTO NOCONFIRM PRESERVE-MODES)
| 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 works for special buffers that contain text which
| doesn't come from a file, but reflects some other data base instead:
| for example, Dired buffers and `buffer-list' buffers.  In these cases,
| it reconstructs the buffer contents from the appropriate data base.
| When called from Lisp, the first argument is IGNORE-AUTO; only offer
| to revert from the auto-save file 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 local variable `revert-without-query', if non-nil, prevents
| confirmation.)
| Optional third argument PRESERVE-MODES non-nil means don't alter
| the files modes.  Normally we reinitialize them using `normal-mode'.
| If the value of `revert-buffer-function' is non-nil, it is called to
| do all the work for this command.  Otherwise, the hooks
| `before-revert-hook' and `after-revert-hook' are run at the beginning
| and the end, and if `revert-buffer-insert-file-contents-function' is
| non-nil, it is called instead of rereading visited file contents.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]