Next: , Previous: , Up: Top   [Contents][Index]


14 File Handling

The basic unit of stored data in Unix is the file. To edit a file, you must tell Emacs to examine the file and prepare a buffer containing a copy of the file’s text. This is called visiting the file. Editing commands apply directly to text in the buffer; that is, to the copy inside Emacs. Your changes appear in the file itself only when you save the buffer back into the file.

Emacs is also able to handle “remote files” which are stored on other hosts. Not only is Emacs somewhat aware of the special issues involved with network file systems, but it can also use FTP and ssh (or rsh) to make local copies of the files, and refresh them on the remote host automatically when you save the buffer. The FTP interface is provided by the standard ‘efs’ package (efs)EFS. The ssh/rsh interface is provided by the optional ‘tramp’ package (tramp)TRAMP. These packages attempt to implement all of the operations described below, making remote file use transparent (except for unavoidable network delays).

In addition to visiting and saving files, Emacs can delete, copy, rename, and append to files, and operate on file directories.


Next: , Previous: , Up: Top   [Contents][Index]