NextPrevUpTopContentsIndex

3.5.5 Miscellaneous file operations

Print File

Editor Command

Arguments: file
Key sequence: None

Prints file , using capi:print-file . See the LispWorks CAPI Reference Manual for details of this function.

Revert Buffer

Editor Command

Arguments: None
Key sequence: None

If the current buffer is associated with a file, its contents revert to the state when it was last saved. If the buffer is not associated with a file, it is not possible for a previous state to be recovered.

If auto-save is on for the current buffer, the version of the file that is recovered is either that derived by means of an automatic save or by means of an explicit save, whichever is the most recent. If auto-save is off, the buffer reverts to its state when last explicitly saved.

If the buffer has been modified and the value of the variable Revert-Buffer-Confirm is t then Revert Buffer asks for confirmation before reverting to a previous state.

Any prefix argument forces Revert Buffer to use the last explicitly saved version.

Revert-Buffer-Confirm

Editor Variable

Default value: t

When the command Revert Buffer is invoked, if the value of this variable is t and the buffer has been modified then confirmation is asked for before the revert operation is performed. If its value is nil , no confirmation is asked for.

Process File Options

Editor Command

Arguments: None
Key sequence: None

The attribute line at the top of the file is reprocessed, as if the file had just been read from disk. If no major mode is specified in the attribute line, the type of the file is used to determine the major mode. See Modes.

Insert File

Editor Command

Arguments: pathname
Key sequence: Ctrl+X I pathname

editor:insert-file-command p &optional pathname buffer

Inserts the file defined by pathname into the current buffer at the current point.

The argument buffer is the buffer in which the file is to be inserted.

Delete File

Editor Command

Arguments: pathname
Key sequence: None

Deletes the file defined by pathname . The user is asked for confirmation before the file is deleted.

Delete File and Kill Buffer

Editor Command

Arguments: buffer
Key sequence: None

editor:delete-file-and-kill-buffer-command p &optional buffer

After confirmation from the user, this deletes the file associated with buffer and then kills the buffer.

Rename File

Editor Command

Arguments: file new-file-name
Key sequence: None

Changes the name of file to new-file-name .

If you are currently editing the file to be renamed, the buffer remains unaltered, retaining the name associated with the old file even after renaming has taken place. If you then save the current buffer, it is saved to a file with the name of the buffer, that is, to a file with the old name.


LispWorks Editor User Guide (Windows version) - 23 Feb 2006

NextPrevUpTopContentsIndex