Lugaru's Epsilon

Epsilon User's Manual and Reference
   Commands by Topic
      Buffers and Files
            . . .
            Read-Only Files
            Saving Files
            Backup Files
            Line Translation
            DOS/OEM Character Set Support
            . . .
         File Variables
            Directory-wide File Variables
            Vi/Vim File Variables
         . . .

Previous   Up    Next
Saving Files  Commands by Topic   Line Translation

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. Epsilon uses this as a template for constructing the backup file name. It copies the template, substituting pieces of the original file for codes in the template, according to the table. The sequence %r substitutes a relative pathname to the original file name, if the file is within the current directory or its subdirectories, or an absolute pathname otherwise.

The sequence %x substitutes the full pathname of the directory containing the Epsilon executable. The sequence %X substitutes the same full pathname, but this time after converting all Windows long file names making up the path to their equivalent short name aliases. For example, if the Epsilon executable was in the directory c:\Program Files\Eps13\bin\, %x would use exactly that pathname, while %X might yield c:\Progra~1\Eps13\bin\. Under Unix, %X is the same as %x. Either always ends with a path separator character like / or \.

     Example 1  Example 2
 Code  Part  c:\dos\  /usr/bin
 %p  Path  c:\dos\  /usr/
 %b  Base  read  bin
 %e  Extension  .me  (None)
 %f  Full name  c:\dos\  /usr/bin
 %r  Relative path  dos\  /usr/bin
   (assuming current    
   directory is  c:\  /usr/mark )
 %x  Executable path  c:\Program Files\Eps13\bin\  /usr/local/epsilon13.12/bin/
 %X  Alias to path  c:\Progra~1\Eps13\bin\  /usr/local/epsilon13.12/bin/

If any other character follows %, Epsilon puts that character into the backup file name. You can use this, for example, to include an actual % character in your backup file name, by putting %% in the template.

Epsilon can automatically save a copy of your file every 500 characters. To make Epsilon autosave, set the variable want-auto-save to 1. Epsilon then counts keys as you type them, and every 500 keys, saves each of your modified files to a file with a name like #file.c.asv#. Epsilon uses a template (see above) to construct this name as well, 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 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   Line Translation

Lugaru Copyright (C) 1984, 2016 Lugaru Software Ltd. All Rights Reserved.