Next: , Up: Files   [Index]


7.3.1 Visiting or Finding Files

Visiting a file means reading a file (information recorded in a computer) into a buffer (information inside of Emacs that can be viewed and edited). Once this is done, we say that the buffer is “visiting” that file, and call the file “the visited file” of the buffer. The buffer contains information copied from the file. If that information is changed, it must be saved (copied back into the file) to make the changes permanent; otherwise the new information will be lost.

Function names that visit files for historical reasons start with find- rather than visit-.

In a Lisp program, if you want to look at the contents of a file but not alter it, the fastest way is to use insert-file-contents in a temporary buffer. Visiting the file is not necessary and takes longer.