Lugaru's Epsilon
Programmer's
Editor

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Buffers and Files
         Buffers
         Files
         Internet Support
         . . .
         Buffer List Editing
      Starting and Stopping Epsilon
         Session Files
         File Associations and DDE
         Sending Files to a Prior Session
         . . .
      Running Other Programs
         The Concurrent Process
         Compiling From Epsilon
         DOS Concurrent Process
      . . .

Previous   Up    Next
Starting and Stopping Epsilon  Commands by Topic   File Associations and DDE


Epsilon User's Manual and Reference > Commands by Topic > Starting and Stopping Epsilon >

Session Files

When you start up Epsilon, it will try to restore the window and buffer configuration you had the last time you ran Epsilon. It will also restore items such as previous search strings, your positions within buffers, and the window configuration.

If you set the variable session-always-restore to zero, Epsilon will only try to restore your previous session if you invoke it without giving a file name on the command line. If you provide an explicit file to edit on the command line, Epsilon will read just that file in, and will refrain from restoring the previous session. (Also see Invoking Epsilon.)

Epsilon restores your previous session by consulting a session file named epsilon.ses, which is normally stored in the directory with Epsilon's other configuration files (or, under Unix, in the directory ~/.epsilon). By default, Epsilon will write such a file when you exit. If you set the value of the variable preserve-session to zero, then Epsilon will not write a session file before exiting. See the description of this variable for more details. Also see the -p flag described in Epsilon Command Line.

You can tell Epsilon to search for an existing session file, starting from the current directory. If a session file doesn't exist in the current directory, then Epsilon looks in its parent directory, then in that directory's parent, and so forth, until it reaches the root directory or finds a session file.

To let Epsilon search like this, set the session-tree-root variable to empty. If this variable is set to a directory name in absolute form, Epsilon will only search for an existing session file in the named directory or one of its children. For example, if session-tree-root holds c:\joe\proj, and the current directory is c:\joe\proj\src, Epsilon will search in c:\joe\proj\src, then c:\joe\proj, for a session file. If the current directory is c:\joe\misc, on the other hand, Epsilon won't search at all (since \joe\misc isn't a child of \joe\proj), but will use the rules below. By default this variable is set to the word NONE, an impossible absolute directory name, so searching is disabled.

If Epsilon finds no such file by searching as described above (or if such searching is disabled, as it usually is), then Epsilon looks for a session file in each of these places, in this order:

  • If the session-default-directory variable is non-empty, in the directory it names. (This variable is empty by default.)

  • If the configuration variable EPSPATH can be found, in the first directory it names. (See Configuration Variables for more on configuration variables.)

  • In the root directory of the current drive (or, for Unix, the ~/.epsilon directory).

All of the above implies that, if you install Epsilon normally and don't change any settings, Epsilon puts session files in the current user's home directory under Unix, and in the directory containing its other files in other environments.

There are three ways to tell Epsilon to search for a file with a different name, instead of the default of epsilon.ses. With any of these methods, specifying an absolute path keeps Epsilon from searching and forces it to use a particular file. Epsilon checks for alternate names in this order:

  • The -p flag can specify a different session file name.

  • An ESESSION configuration variable can specify a different session file name.

  • The session-file-name variable can specify a name.

If you wish, you may maintain different sessions associated with different directories. To make Epsilon look for its session file only in the current directory, and create a new session file there on exiting, set session-default-directory to "." and leave session-tree-root set to "NONE". This will force Epsilon to restrict its attention to the current directory when looking for a session file.

The write-session command writes a session file, detailing the files you're currently editing, the window configuration, default search strings, and so forth. By default, Epsilon writes a session file automatically whenever you exit, but you can use this command if you prefer to save and restore sessions manually. The read-session command loads a session file, first asking if you want to save any unsaved files. Reading in a session file rereads any files mentioned in the session file, as well as replacing search strings, all bookmarks, and the window configuration. However, any files not mentioned in the session file will remain, as will keyboard macros, key bindings, and most variable settings. If you use either command and specify a different session file than the default, Epsilon will use the file name you provided when it automatically writes a session file as you exit.

You can set the session-restore-files variable to control whether Epsilon restores files named in a session file, or just search strings, command history, and similar settings. If session-restore-files is 0, when Epsilon restores a session, it won't load any files named in the session, only things like previous search strings. If 1, the default, Epsilon will restore previous files as well as other settings. If 2, Epsilon will restore previous files only if there were no files specified on Epsilon's command line.

You can set the session-restore-max-files variable to limit the number of files Epsilon will reread, which is by default 15. The files are prioritized based on the time of their last viewing in Epsilon, so by default Epsilon restores the 15 files you've most recently edited. Also, Epsilon won't automatically restore any files bigger than the size in bytes specified by the session-restore-biggest-file variable.

You can set the session-restore-directory variable to control whether Epsilon restores any current directory setting in the session file. Set it to 0 and Epsilon will never do this. Set it to 1 and Epsilon will always restore the current directory when it reads a session file. The default value 2 makes Epsilon restore the current directory setting only when the -w1 flag has been specified. (Under Windows, Epsilon's installer includes this flag when it makes Start Menu shortcuts.)

Standard bindings:

    read-session
   write-session
 



Previous   Up    Next
Starting and Stopping Epsilon  Commands by Topic   File Associations and DDE


Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.