Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Repeating Commands
         Repeating a Single Command
         Keyboard Macros
      Simple Customizing
         . . .
         CUA Keyboard
         Variables
         Saving Customizations
         Command Files
      Advanced Topics
         Changing Commands with EEL
         Updating from an Old Version
         Keys and their Representation
         Customizing the Mouse
      . . .

Previous   Up    Next
Variables  Commands by Topic   Command Files


Epsilon User's Manual and Reference > Commands by Topic > Simple Customizing >

Saving Customizations

Epsilon can save any new bindings you have made and any macros you have defined for future editing sessions. Epsilon uses two kinds of files for this purpose, state files and command files (such as the einit.ecm file Epsilon normally uses to save your customizations).

The next section describes command files such as the einit.ecm file. For most users, the einit.ecm file is the best way to save customizations, but users with a large number of customizations may want to take advantage of the improved startup speed possible by using a state file instead.

Both methods can save bindings, macros, and other sorts of customizations, but they differ in many respects:

  • A state file contains commands, macros, variables, and bindings. A command file can contain macros, many types of variables, and bindings, but it can't contain commands written in Epsilon's extension language. (It can contain requests to load other files containing such commands, though.)

  • When Epsilon writes a state file, all currently defined commands, macros and variables go into it. A command file contains just what you put there.

  • Epsilon can only read a state file during startup. It makes the new invocation of Epsilon have the same commands as the Epsilon that performed the write-state command that created that state file. By contrast, Epsilon can load a command file at any time.

  • A command file appears in a human-readable format, so you can edit it as a normal file. By contrast, Epsilon stores a state file in a binary format. To modify a state file, you read it into a fresh Epsilon, use appropriate Epsilon commands (like bind-to-key to change bindings), then save the state with the write-state command.

  • Epsilon can read a state file much faster than a command file.

  • Binary state files from one release of Epsilon usually aren't compatible with state files from a different major release. Command files are.

  • To remove a particular customization from a command file, just delete or comment out its line. Removing a customization from a state file is more complicated, because Epsilon doesn't normally maintain the original setting of a variable, or the original definition of an EEL command you've redefined. You can use delete-name to delete a macro, or explicitly set a variable back to its original setting by looking that up in the documentation, but undoing some customizations requires returning to the original state file and reapplying just the customizations you want, via list-customizations.

The write-state command on Ctrl-F3 asks for the name of a file, and writes the current state to that file. The file name has its extension changed to ".sta" first, to indicate a state file. If you don't provide a name, Epsilon uses the name "epsilon-v14.sta", the same name that it looks for at startup. (The state file name includes Epsilon's major version number.) You can specify another state file for Epsilon to use at startup with the -s flag.

By default, when you write a new state file, Epsilon makes a copy of the old one in a file named ebackup.sta. You can turn backups off by setting the variable want-state-file-backups to 0, or change the backup file name by modifying the state-file-backup-name template. See File Name Templates for information on templates.

Epsilon's default state file sits in its main directory. (In Windows, this is normally under \Program Files.) If you write a customized state file, it will go in your customizations directory (see The Customization Directory), and Epsilon will read it instead of the default state file. You can use Epsilon's -s flag to start Epsilon with its default state file, ignoring your customized one, by running it as "epsilon -s original".

It's a good idea to keep all your customizations in one place, either a state file or an einit.ecm file. If you have all your customizations in a state file and want to instead store them all in an einit.ecm file, run list-customizations, and then delete or rename the customized state file in your customizations directory.

If you have all your customizations in an einit.ecm command file and want to instead store them all in a state file, just run Epsilon, letting it load your einit.ecm, run write-state, and delete or rename your customized einit.ecm file.

If you customize Epsilon using an einit.ecm file, Epsilon will start up by reading its default state file, which contains its standard settings. Then it will load your customizations from your einit.ecm file.

If you customize Epsilon using a state file, Epsilon will read your customized state file instead of the default one.

(If you customize Epsilon using both methods, Epsilon will read your customized state file, then load customizations in your einit.ecm file on top. This is confusing, which is why we don't recommend this arrangement.)

The recommended method for saving customizations is to save them all in your einit.ecm file, and never write a customized state file.

When you make a change you want to keep, using commands like set-variable or bind-to-key, run Alt-x list-customizations to put it in your einit.ecm file. Or set the record-customizations variable to keep all changes by default. Or edit your einit.ecm directly.

Remember to save your einit.ecm file after changing it. Changes will take effect the next time Epsilon starts, or you can use Alt-x load-buffer to load them from an einit.ecm file at once.

Standard bindings:

  Ctrl-F3  write-state
 



Previous   Up    Next
Variables  Commands by Topic   Command Files


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