In older emacs versions I used to type:

C-x C-f RET

And it would re-open the file currently visited in the buffer. Now (emacs 23.1.1) it opens Dired of the directory.

link|improve this question
feedback

3 Answers

up vote 2 down vote accepted

I use M-x find-alternate-file which is by default bound to C-x C-v.

This command allows to reload a file onto the current buffer, reloading the same file include - which is shown in the mini-buffer by default. This is however not as convenient if you have ido-mode enabled for buffer-switching as it will not display the current file name by default.

link|improve this answer
Other answers were excellent, too, but this answer has the fewest keystrokes. – Eyal Jan 12 '11 at 12:51
feedback

Are you sure you don't want to just revert the buffer?

M-x revert-buffer RET
link|improve this answer
feedback

You can do C-x C-f M-n RET. The behavior was changed because C-x C-f RET to reopen a file wasn't nearly as common as C-x C-f DEL RET to invoke Dired on the directory.

You can also use M-x revert-buffer to reload a file from disk, and Emacs will tell you (on most operating systems) if you try to edit a file whose copy on disk has been modified externally.

C-x C-f M-n is also useful to obtain the full path to the file in the minibuffer, so you can open a file with a similar name or copy it to the kill ring or clipboard.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.