all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* re-read an opened file...
@ 2002-10-01 13:35 Roland Reichenberg
  2002-10-01 13:39 ` Phillip Lord
  0 siblings, 1 reply; 4+ messages in thread
From: Roland Reichenberg @ 2002-10-01 13:35 UTC (permalink / raw)


Hi everybody,

does anybody know how to re-read an already opened file?

If another process has changed the contents of the file that I have 
already opened before, how can I make emacs to read again the newest 
source of the file?

Thanks in advance,

Roland

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: re-read an opened file...
  2002-10-01 13:35 re-read an opened file Roland Reichenberg
@ 2002-10-01 13:39 ` Phillip Lord
  2002-10-01 20:26   ` Richard V. Molen
  2002-10-01 20:27   ` Richard V. Molen
  0 siblings, 2 replies; 4+ messages in thread
From: Phillip Lord @ 2002-10-01 13:39 UTC (permalink / raw)


>>>>> "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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: re-read an opened file...
  2002-10-01 13:39 ` Phillip Lord
@ 2002-10-01 20:26   ` Richard V. Molen
  2002-10-01 20:27   ` Richard V. Molen
  1 sibling, 0 replies; 4+ messages in thread
From: Richard V. Molen @ 2002-10-01 20:26 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: re-read an opened file...
  2002-10-01 13:39 ` Phillip Lord
  2002-10-01 20:26   ` Richard V. Molen
@ 2002-10-01 20:27   ` Richard V. Molen
  1 sibling, 0 replies; 4+ messages in thread
From: Richard V. Molen @ 2002-10-01 20:27 UTC (permalink / raw)


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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-01 20:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-01 13:35 re-read an opened file Roland Reichenberg
2002-10-01 13:39 ` Phillip Lord
2002-10-01 20:26   ` Richard V. Molen
2002-10-01 20:27   ` Richard V. Molen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.