read-session - Read in session information
n read-session [ "session-file" ]
read-session reads in a MicroEmacs '06 session file, setting the current session information. If argument n is not given then the given "session-file" is simply read in. If a non-zero argument is specified then default session is set to the given file-name and the file is read. If an argument of zero is given then the default session is re-read. Information read in (and saved) from the history file includes:-
MicroEmacs '06's environment may be retained almost intact by the use of the default session and using the -c (continue) command-line option to re-load all files that were being edited in a previous session.
On loading a new session then the user is prompted to save the current session. If the numeric argument is zero (bit 0 is 0) then the user is not prompted and the session-file is effectively loaded and merged into the current session.
When running multiple MicroEmacs '06 sessions on the same work-station (or different workstations sharing the same home directory), the default history is saved when MicroEmacs '06 exits. As a result the last MicroEmacs '06 sessions that terminates writes the history information used next time.
The session information is saved in a registry format file (see esf(8)). Reference should be made to the notes included in erf(8) as to how the history file may be edited and effected in the same MicroEmacs '06 session.
The user may now have multiple sessions, this is useful when one is working on different projects, the sessions are created using save-session(3) using a new session name. Starting the editor with a different session means that the hilighting scheme may be different between different sessions i.e. "Blue Hue" and "Sherwoord Forest". Note that the color scheme should be changed with change-scheme(3) and not with user-setup(3) if different sessions are to use different color schemes.
Reading a session is generally performed when a MicroEmacs session is started using the "-c" command line option rather than from the emacs mode line or main menu, see me(1). Invoking
where <mySessionName> is the name of the session (the $MENAME(5) or system login name) will restore all of of the buffers, windows layout, point and mark positions, main window size etc. at the point of the last shut down. e.g. given a system login name of jasspa then
restores the session to the state when jasspa last exited MicroEmacs. When the session name is specified then no other files should be specified, so the command line
me -cjasspa morefiles.txt
restores the buffers but does not restore the window layout because this has been destroyed by the introduction of the new file "morefiles.txt". This type of command with another file behaves as the old "me -c" command prior to the 2006 release that did not support sessions. If <mySessionName> is not specified then the buffers are restored but the window layout is not restored.
Copyright (c) 1998-2006 JASSPA
Last Modified: 2006/09/04
Generated On: 2006/10/07