Debate: always save session data?

31 views
Skip to first unread message

Edward K. Ream

unread,
Jul 3, 2023, 7:34:16 AM7/3/23
to leo-editor

We disagree about when to write session data (a list outlines). Some say, "Always." Others say, "Only if the command line had no outlines."


I see no way to allow all Leonistas to make Leo work as they like. A command line is out of the question. My bright idea failed spectacularly :-)


So we must choose now how Leo will work for everyone. It's time to resolve this question!


Please put forth your arguments. I have no opinion on the question.


I won't tolerate claims that Leo is unusable because it doesn't work as you like. You must explain why your way is best for everyone.


Good luck. Let the debate begin!


Edward

Edward K. Ream

unread,
Jul 3, 2023, 7:47:38 AM7/3/23
to leo-editor
On Monday, July 3, 2023 at 6:34:16 AM UTC-5 Edward K. Ream wrote:

> A command line is out of the question.
...
> So we must choose now how Leo will work for everyone. It's time to resolve this question!

It's funny how writing changes my mind.

Aha! The only way to resolve this question is to add the --always-write-session-data command-line option.

Debate canceled!

Edward

Thomas Passin

unread,
Jul 3, 2023, 9:32:17 AM7/3/23
to leo-editor
I just tested the new code for --always-write-session-data, and it worked as expected:

1. Open Leo and load several outlines;
2. Close Leo and re-open with .leo\workbook.leo on the command line;
3. Close and re-open Leo without an outline on the command line.
4. Observe that the several outlines get loaded.
5.  Close Leo and re-open with -a and .leo\workbook.leo on the command line;
6.  Close and re-open Leo without an outline on the command line.;
7. Observe that only the workbook loads.  This shows that leo.session was created.

Edward K. Ream

unread,
Jul 3, 2023, 10:57:02 AM7/3/23
to leo-e...@googlegroups.com
On Mon, Jul 3, 2023 at 8:32 AM Thomas Passin <tbp1...@gmail.com> wrote:
I just tested the new code for --always-write-session-data, and it worked as expected:

1. Open Leo and load several outlines;
2. Close Leo and re-open with .leo\workbook.leo on the command line;
3. Close and re-open Leo without an outline on the command line.
4. Observe that the several outlines get loaded.
5.  Close Leo and re-open with -a and .leo\workbook.leo on the command line;
6.  Close and re-open Leo without an outline on the command line.;
7. Observe that only the workbook loads.  This shows that leo.session was created.

Many thanks for your testing.

I'm going to shorten --always-write-session-data to --write-session.

I plan no other changes to PR #3215, aside from unit tests and documentation.

Edward

Thomas Passin

unread,
Jul 3, 2023, 11:24:39 AM7/3/23
to leo-editor
On Monday, July 3, 2023 at 10:57:02 AM UTC-4 Edward K. Ream wrote:
I'm going to shorten --always-write-session-data to --write-session.

Remember to change  -a to -w (it's the kind of thing I would forget :-) ).

Edward K. Ream

unread,
Jul 3, 2023, 11:50:54 AM7/3/23
to leo-editor
The new name of the command-line option is save-session.

I see no reason to abbreviate it to -s.

Edward
Reply all
Reply to author
Forward
0 new messages