Lugaru's Epsilon
Programmer's
Editor 14b12

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Buffers and Files
         Buffers
         Files
            . . .
            Read-Only Files
            Saving Files
            Backup Files
            File Name Templates
            Line Translation
            . . .
         File Variables
            Directory-wide File Variables
            Vi/Vim File Variables
         . . .

Previous   Up    Next
Saving Files  Commands by Topic   File Name Templates


Epsilon User's Manual and Reference > Commands by Topic > Buffers and Files > Files >

Backup Files

Epsilon doesn't normally keep the previous version of a file around when you save a modified version. If you want backups of saved files, you can set the buffer-specific variable want-backups to 1, using the set-variable command described in Variables. If this variable is 1, the first time you save a file in a session, Epsilon will first preserve the old version by renaming any existing file with that name to a file with the extension ".bak". For instance, saving a new version of the file text.c preserves the old version in text.bak. (If you delete a file's buffer and later read the file again, Epsilon treats this as a new session and makes a new backup copy the next time you save.) If want-backups variable is 2, Epsilon will do this each time you save the file, not just the first time. The backup-by-renaming variable controls whether Epsilon backs up files by renaming them (faster) or copying them (necessary in some environments to preserve attached attributes).

You can change the name Epsilon uses for a backup file by setting the variable backup-name, which holds a file name template (see the next section). The default setting %p%b.bak uses the same path and base file name as the original file but replaces the extension with .bak.

Epsilon automatically saves a copy of each modified file periodically, into a separate file with a name like #file.c.asv#, then deletes the autosaved file when you tell it to save the original (and when Epsilon exits). The variable want-auto-save controls this. Epsilon uses a template (see above) to construct the name of each auto save file, stored in the variable auto-save-name. Other bits in the want-auto-save variable let you make auto-saving more verbose, or tell Epsilon not to automatically delete auto-saved files when exiting, or when the file is saved normally.

You can alter the number of keystrokes it waits between autosaves by setting the variable auto-save-count. Epsilon also auto-saves after you've been idle for 30 seconds; set the auto-save-idle-seconds variable to alter this number. Very large buffers will never be auto-saved; see the auto-save-biggest-file variable to alter this.

Sometimes you may want to explicitly write the buffer out to a file for backup purposes, but may not want to change the name of the file associated with the buffer. For that, use the copy-to-file command on Ctrl-F7. It asks you for the name of a file, and writes the buffer out to that file, but subsequent Ctrl-x Ctrl-s's will save to the original file.

Standard bindings:

  Ctrl-F7  copy-to-file
 



Previous   Up    Next
Saving Files  Commands by Topic   File Name Templates


Lugaru Epsilon Programmer's Editor 14b12 manual. Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.