LispWorks Editor User Guide > 3 Command Reference > 3.5 File handling

NextPrevUpTopContentsIndex

3.5.3 Auto-saving files

The auto-save feature allows for periodic backups of the file associated with the current buffer. These backups are only made if auto-save is switched on.

This feature is useful if the LispWorks editor is killed in some way (for example, in the case of a system crash or accidental killing of the editor process) before a file is explicitly saved. If automatic backups are being made, the state of a file when it was last auto-saved can subsequently be recovered.

By default, automatic backups are made both after a predefined number of key strokes, and also after a predefined amount of time has elapsed.

By default, auto-saved files are in the same directory as the original file, with the name of the auto-save file (or "checkpoint file") being the name of the original file enclosed within # characters.

Toggle Auto Save

Editor Command

Arguments: None
Key sequence: None

Switches auto-save on if it is currently off, and off if it is currently on.

With a positive prefix argument, auto-save is switched on. With a negative or zero prefix argument, auto-save is switched off. Using prefix arguments with Toggle Auto Save disregards the current state of auto-save.

Auto Save Toggle is a synonym for Toggle Auto Save .

auto-save is initially on or off in a new buffer according to the value of the editor variable default-auto-save-on.

default-auto-save-on

Editor Variable

Default value: t

The default auto-save state of new buffers.

auto-save-filename-pattern

Editor Variable

Default value: "~A#~A#"

This is a format control string used to make the filename of the checkpoint file. format is called with two arguments, the first being the directory namestring and the second being the file namestring of the default buffer pathname.

The default value causes the auto-save file to be created in the same directory as the file for which it is a backup, and with the name surrounded by # characters.

auto-save-key-count-threshold

Editor Variable

Default value: 256

Specifies the number of destructive/modifying keystrokes that automatically trigger an auto-save of a buffer. If the value is nil , this feature is turned off.

auto-save-checkpoint-frequency

Editor Variable

Default value: 300

Specifies the time interval in seconds after which all modified buffers which are in "Save" mode are auto-saved. If the value is nil , zero or negative, this feature is turned off.

auto-save-cleanup-checkpoints

Editor Variable

Default value: t .

This variable controls whether an auto-save function will cleanup by deleting the checkpoint file for a buffer after it is saved. If the value is true then this cleanup will occur.


LispWorks Editor User Guide (Unix version) - 22 Dec 2009

NextPrevUpTopContentsIndex