Next: Status line and Windows Up: jed Previous: File Types and Sizes Contents

# Backup and Auto-save Files

On UNIX and MS-DOS systems, jed creates backup files by appending a `~` character to the filename. The VMS operating system handles backup files itself. jed periodically auto-saves its buffers. On UNIX and MS-DOS, auto-save files are prefixed with the pound sign `#`. On VMS, they are prefixed with `_$`. The auto-save interval may be changed by setting the variable `MAX_HITS` to the desired value. The default is 300 ``hits'' on the buffer. A ``hit'' is defined as a key which MAY change the state of the buffer. Cursor movement keys do not cause hits on the buffer.

Like many of jed's features, the names of auto-save and backup files can be controlled by the user. The file `site.sl` defines two functions, `make_backup_filename`, and `make_autosave_filename` that generate the file names described in the previous paragraph. Like all S-Lang functions, these functions may be overloaded and replaced with different ones. See also information about `find_file_hook` in the section on hooks.

On UNIX systems, jed catches most signals and tries to auto-save its buffers in the event of a crash or if the user accidently disconnects from the system (`SIGHUP`).

If an auto-save file exists and you is desire to recover data from the auto-save file, use the function `recover_file`. Whenever jed finds a file, it checks to see if an auto-save file exists as well as the file's date. If the dates are such that the auto-save file is more recent jed will display a message in the mini-buffer alerting the user of this fact and that the function `recover_file` should be considered.

Next: Status line and Windows Up: jed Previous: File Types and Sizes Contents