help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Command to re-read current file?


From: lawrence mitchell
Subject: Re: Command to re-read current file?
Date: Mon, 04 Aug 2003 15:48:25 +0100
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50

bill wrote:

[...]

> But this is a relatively trivial issue.  A far more important
> question is the following meta-question:  how could I have figured
> out the answer to the previous question on my own?  I tried apropos
> with various query strings, such as "re-find", "re-open", "re-visit",
> and variants thereof, but they yielded nothing.  Is there a better
> approach to finding the command for an Emacs functionality?

Well, you can try the Emacs manual.  In this case, the relevant
part was under (info "(emacs)Files").  You were going about it
the right way.  Another option you could have used might have
been apropos-documentation, which searches in docstrings too.


In this case, I think you want revert-buffer:

/----[ 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.
|
| [...]
|
| Optional second argument NOCONFIRM means don't ask for confirmation at
| all.  (The local variable `revert-without-query', if non-nil, prevents
| confirmation.)
\----

-- 
lawrence mitchell <wence@gmx.li>


reply via email to

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