Key sequence: None
editor:find-file-command p &optional pathname
Finds a new buffer with the same name as pathname (where pathname is the name of the file to be found, including its directory relative to the current directory), creating it if necessary, and inserts the contents of the file into the buffer. The contents of the buffer are displayed in an editor pane and may then be edited.
The file is initially read in the external format (encoding) given by the editor variable Input-Format-Default. If the value of this is
chooses the external format to use. The external format is remembered for subsequent reading and writing of the buffer, and its name is displayed in the mode line.
If the file is already being visited a new buffer is not created, but the buffer already containing the contents of that file is displayed instead.
If a file with the specified name does not exist, an empty buffer with that file name is created for editing purposes, but the new file is not created until the appropriate save file command is issued.
If there is no prefix argument, a new Editor window is created for the file. With any prefix argument, the file is shown in the current window.
Another version of this command is Wfind File
editor:wfind-file-command p &optional pathname
Calls Find File with a prefix argument (that is, the new file is opened in the existing window).
editor:visit-file-command p &optional pathname buffer
Does the same as Find File with a prefix argument, but kills the current buffer and replaces it with the newly created buffer containing the file requested. If the contents of the buffer to be killed have been modified, the user is asked if the changes are to be saved to file.
The argument buffer is the buffer in which the contents of the file are to be displayed.
The default external format used by Find File, Wfind File and Visit File for reading files into buffers.
If the buffer already has an external format (either it has previously been read from a file, or Set External Format has been used to specify an external format) then
is ignored. If the value is
and the buffer does not have an external format,
chooses the external format to use.
The value should be
or an external format specification. See the
LispWorks User Guide
for a description of these and of how
chooses an external format.
If you have specified an input encoding via the Editor tool's Preferences dialog, then
is initialized to that value on startup.