source: trunk/j/doc/sessions.html @ 2

Last change on this file since 2 was 2, checked in by piso, 18 years ago

Initial checkin.

File size: 2.8 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2<html>
3<head>
4<title>J User's Guide - Sessions</title>
5<LINK REL="stylesheet" HREF="j.css" TYPE="text/css">
6</head>
7<body>
8<a href="contents.html">Top</a>
9<hr>
10<h1>Sessions</h1>
11<hr>
12<p>
13By default, information about your editing session is saved so that when you
14restart j, things come back more or less as you left them: the same buffers
15will be open (except for remote and transient buffers), and the current
16location in each buffer will be the same.
17</p>
18<p>
19J also provides support for named sessions with the commands
20<a href="commands.html#saveSession">saveSession</a> and
21<a href="commands.html#loadSession">loadSession</a>.
22</p>
23<p>
24<a href="commands.html#saveSession">saveSession</a> saves information about
25the current editing session in a named session file. If no named session is
26active yet, you will be prompted for a name for the current session;
27subsequent saves will go to that session file without further prompting.
28</p>
29<p>
30<a href="commands.html#loadSession">loadSession</a> loads a previously saved
31named session, which then becomes the active named session as far as
32<a href="commands.html#saveSession">saveSession</a> is concerned. All
33currently open buffers are closed before the new session is loaded.
34</p>
35<p>
36If a named session is active, you can save the current session under a new
37name by using <a href="commands.html#executeCommand">executeCommand</a> to
38invoke <a href="commands.html#saveSession">saveSession</a> with the new name
39as an argument (e.g. Alt X, "saveSession foo"). If you do this, subsequent
40saves will go to the new session file by default.
41</p>
42<p>
43When a named session is active, the session name appears in the title bar of
44the top-level window, enclosed in brackets.
45</p>
46<p>
47By default, the information in a named session file is only updated when you
48explicitly invoke <a href="commands.html#saveSession">saveSession</a>. This
49allows you to exercise better control over the contents of named session
50files. If you'd like named session information to be updated automatically,
51add this line to ~/.j/prefs or C:\.j\prefs:
52<pre>
53    autosaveNamedSessions = true</pre>
54<p>
55You can use "-session" on the command line to start j with a specific named
56session:
57<pre>
58    j -session foo</pre>
59or
60<pre>
61    java -jar j.jar -session foo</pre>
62<p>
63When you start j without specifying a named session on the command line, the
64previous session is restored, but no named session is active until you do
65<a href="commands.html#saveSession">saveSession</a> or
66<a href="commands.html#loadSession">loadSession</a>.
67</p>
68<p>
69Named session files are stored in the directory ~/.j/sessions (or
70C:\.j\sessions). You might want to visit that directory on your day off and
71delete session files that are no longer needed.
72</p>
73</body>
74</html>
Note: See TracBrowser for help on using the repository browser.