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

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

Re: re-read an opened file...


From: Richard V. Molen
Subject: Re: re-read an opened file...
Date: Tue, 01 Oct 2002 20:26:37 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Phillip Lord <p.lord@russet.org.uk> writes:

> >>>>> "Roland" == Roland Reichenberg <r.reichenberg@gmx.de> writes:
> 
>   Roland> Hi everybody,
> 
>   Roland> does anybody know how to re-read an already opened file?
> 
>   Roland> If another process has changed the contents of the file that
>   Roland> I have already opened before, how can I make emacs to read
>   Roland> again the newest source of the file?
> 
> M-x revert-buffer
> 
> or try and edit the buffer and emacs will ask you about it. 
> 
> Also see "auto-revert-mode" which is, er, a mode which reverts
> automatically. 
> 
> Cheers
> 
> 
> Phil

A cheap trick when one knows the file has changed is to type in
lowercase 'r r'.  The first 'r' is has the effect of trying to edit
the file. Emacs realizes the version on disk is more recent and asks
what you want to do.  The second 'r' selects 'revert'.  Of course,
it's nice to know one's undo key (C-_) in case it hasn't changed.
I find this useful when re-viewing compiler-generated output and such.

-- 
Richard V. Molen

Warning!!
Signature under construction, safety glasses required.


reply via email to

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