[comp.emacs] How do I force emacs to read from disc?

david@WUBIOS.WUSTL.EDU (David J. Camp) (12/22/90)

In Reply to this Note From: <Peter Craft>
>If I spawn a shell from within emacs, and copy a file over one of the files
>that I already have an emacs buffer open, and then return to that emacs
>buffer, I will still be editing the original file.  If I then write the 
>buffer, I will overwrite the file that I just copied.  (did that make sence?)
>
>Anyway, my question is:  How do I tell emacs to reread from disc, rather than
>visiting the buffer that it already has open?
>

Type "C-X k" to kill the buffer.  Then type "C-X C-F" to reopen the file.
-David-

# david@wubios.wustl.edu             ^     Mr. David J. Camp
# david%wubios@wugate.wustl.edu    < * >   +1 314 382 0584
# ...!uunet!wugate!wubios!david      v     "God loves material things."

abrown@hpcvca.CV.HP.COM (Allen Brown) (12/25/90)

>> Anyway, my question is:  How do I tell emacs to reread from disc,
>> rather than visiting the buffer that it already has open?

> Type "C-X k" to kill the buffer.  Then type "C-X C-F" to reopen the file.
> -David-

Or use C-x C-v.

BTW I use an alternate find-alternate-file to make this more
convenient.

(defun find-alter-file (filename)
  "Like find-alternate-file, but presents current filename for editing."
  (interactive (list (read-file-name
                       "Find alternate file: "
                       (or (buffer-file-name) default-directory))))
  (find-alternate-file filename))
(global-set-key "\C-x\C-v" 'find-alter-file)

--
  Allen Brown  abrown@cv.hp.com or abrown%hpcvca@hplabs.hp.com
	    or hplabs!hpcvca!abrown or "Hey you!"
  Not representing my employer.
  "No matter where you go... there you are." --- Buckaroo Bonzai

nhess@gumby.us.oracle.com (Nate Hess) (12/26/90)

In article <640018@hpcvca.CV.HP.COM>, abrown@hpcvca (Allen Brown) writes:
>> Type "C-X k" to kill the buffer.  Then type "C-X C-F" to reopen the file.
>> -David-

>Or use C-x C-v.

Actually, you can just use C-x C-f, and then press RET when prompted for
the file name.  It defaults to the file name of the buffer you're
currently visiting.  Emacs will then ask if you want to read the file
from disk.

--woodstock
-- 
	   "What I like is when you're looking and thinking and looking
	   and thinking...and suddenly you wake up."   - Hobbes

nhess@us.oracle.com or ...!uunet!oracle!nhess or (415) 506-2650