From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rvmolen@bambecksystems.com (Richard V. Molen) Newsgroups: gmane.emacs.help Subject: Re: re-read an opened file... Date: Tue, 01 Oct 2002 20:27:02 GMT Organization: Giganews.Com - Premium News Outsourcing Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: <3D99A4BC.2060201@gmx.de> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1033504557 1857 127.0.0.1 (1 Oct 2002 20:35:57 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 1 Oct 2002 20:35:57 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17wTkJ-0000Th-00 for ; Tue, 01 Oct 2002 22:35:56 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17wTkc-0001Bl-00; Tue, 01 Oct 2002 16:36:14 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!logbridge.uoregon.edu!nntp-relay.ihug.net!ihug.co.nz!west.cox.net!cox.net!nntp2.aus1.giganews.com!nntp.giganews.com!nntp3.aus1.giganews.com!bin4.nnrp.aus1.giganews.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 X-GC-Trace: gv1-XEt46PQ+9wwFTayDsPpGb7LcrahRzOBijZJ6K0E0nAV4jQjjcV93+k2 Original-NNTP-Posting-Date: Tue, 01 Oct 2002 15:27:02 CDT Original-Lines: 36 Original-X-Trace: sv3-qsHpcpZj53+QDC5XmAiC3V8Ljv9N8kUT431b6QXYf3eNZDTkUEanTunbHkoIgfa/tCpnY2cyXnnUXX0!Et3Ln13NzU4QUbK/j+27kkcKr97BnJ3RoLpiUaIprF1KNmUQ1kpkCF6XBMWwFhDFfRYy Original-X-Complaints-To: abuse@GigaNews.Com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Original-Xref: nntp.stanford.edu gnu.emacs.help:105613 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:2159 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:2159 Phillip Lord writes: > >>>>> "Roland" == Roland Reichenberg 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.