Re: how to get all the content of the body?

2023-06-30 Thread Thomas Passin

On Friday, June 30, 2023 at 10:17:35 PM UTC-4 Thomas Passin wrote:

I tested the script with the latest revision of the PR3215 branch that has 
all the UNL/GNX changes.  It still works, Glory Hallelujah!

On Wednesday, June 28, 2023 at 10:14:50 AM UTC-4 Edward K. Ream wrote:

On Wed, Jun 28, 2023 at 8:09 AM HaveF HaveF  wrote:

> Super useful function! It works! You save my day, Thomas!


Hmm, I must have posted that script in a different thread.  Here's the one 
I'm talking about:

UNL = 'unl://C:/Tom/git/leo-editor/leo/core/LeoPyRef.leo#Code-->Core 
classes-->@file leoGlobals.py-->g.Urls & UNLs-->g.handleUnl'

c0, p0 = c, c.p
c2 = g.handleUnl(UNL, c)
content = c2.p.b  # < here is the content of the UNL's body

if c2 is not c0:
g.app.selectLeoWindow(c0)

c0.selectPosition(p0)
print(content[:100])  # To verify we got the right text

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b307f3de-e8e8-412a-b33c-6587453e9f3fn%40googlegroups.com.


Re: how to get all the content of the body?

2023-06-30 Thread Thomas Passin
I tested the script with the latest revision of the PR3215 branch that has 
all the UNL/GNX changes.  It still works, Glory Hallelujah!

On Wednesday, June 28, 2023 at 10:14:50 AM UTC-4 Edward K. Ream wrote:

> On Wed, Jun 28, 2023 at 8:09 AM HaveF HaveF  wrote:
>
> > Super useful function! It works! You save my day, Thomas!
>
> Thanks, Thomas, for your help.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/08099399-4bfe-406f-9023-0715193c0bden%40googlegroups.com.


Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Thomas Passin
All right, after merging the latest rev, the outlines open correctly on 
restart, and there is no message about the missing set-rep-dir.cmd file.  I 
went back and checked that problematic UNL and it still is handled 
correctly.

Just one thing ... when a CTRL-Click on a UNL navigates to its target, the 
focused node in the tree, which is the correct one, is not always visible 
in the window.  In my test, I had to scroll the tree to find it.

On Friday, June 30, 2023 at 7:53:17 PM UTC-4 Edward K. Ream wrote:

> 1. After merging the new rev and re-launching Leo, the previously-open 
>>> outlines were not opened, except for the workbook;
>>> 2. I got this (minor) message: not found: 
>>> C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd
>>>
>>
>> I'm seeing something similar, repeatedly.  I'm on it.
>>
>
> Rev 18839a6f0 
> 
>  
> fixes multiple problems, adds important comments and improves a docstring.
>
> All my tests pass.  What about you?
>
> Edward
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/dab20a7d-bec3-4c61-a187-1f8f01caf8bbn%40googlegroups.com.


Re: Transliterate mypy into rust? Using ChatGPT??

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 6:52 PM Robert-Felix  wrote:

> Of course,  You'd need gpt4 at least for that in my experience. Gpt3 was
> good enough for demos and small chunks witouth anything tricky.
>

Or maybe gpt5?

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS1P_6wq%2BiBKNBkz08Pfv5CtHc0BzhDf08w4o8a7e8VghA%40mail.gmail.com.


Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Edward K. Ream
> 1. After merging the new rev and re-launching Leo, the previously-open
>> outlines were not opened, except for the workbook;
>> 2. I got this (minor) message: not found:
>> C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd
>>
>
> I'm seeing something similar, repeatedly.  I'm on it.
>

Rev 18839a6f0

fixes multiple problems, adds important comments and improves a docstring.

All my tests pass.  What about you?

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS321_-5v7jXz%2Ba6cPctWMs%3DcEkz5D%2Bo6yH9SMvYP8tjiA%40mail.gmail.com.


Re: Transliterate mypy into rust? Using ChatGPT??

2023-06-30 Thread Robert-Felix
Of course,  You'd need gpt4 at least for that in my experience. Gpt3 was
good enough for demos and small chunks witouth anything tricky.

On Fri, Jun 30, 2023, 4:39 p.m. Thomas Passin  wrote:

> I'd try for Julia, myself.  It's much more like Python, and reputedly very
> fast.  I think the program is too large to be easy to find all the things
> the ChatGPT would get plausible but wrong ...
>
> On Friday, June 30, 2023 at 3:12:08 PM UTC-4 Edward K. Ream wrote:
>
>> I've just asked this question
>>  of the mypy devs.
>>
>> Any comments? :-)
>>
>> Edward
>>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/leo-editor/f3de19bd-8e2e-4dfe-9fad-eb2379be9901n%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAC%3DZVR%2BeNeEoTQEHuYdGouSaO-doWGbS%2B2Git%2BFLgje9T10PjA%40mail.gmail.com.


Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 4:19 PM Thomas Passin  wrote:

> It did fix it.
>
> But two more problems:
>
> 1. After merging the new rev and re-launching Leo, the previously-open
> outlines were not opened, except for the workbook;
> 2. I got this (minor) message: not found:
> C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd
>

I'm seeing something similar, repeatedly.  I'm on it.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0F6wQkeU-HVOoWg%2BvqRnE-e7o1GE02EskP1MOb14vZHQ%40mail.gmail.com.


Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Thomas Passin
It did fix it. 

But two more problems:

1. After merging the new rev and re-launching Leo, the previously-open 
outlines were not opened, except for the workbook;
2. I got this (minor) message: not found: 
C:/Tom/git/leo-editor/leo/scripts/set-repo-dir.cmd

On Friday, June 30, 2023 at 2:43:31 PM UTC-4 Edward K. Ream wrote:

> On Fri, Jun 30, 2023 at 1:25 PM Thomas Passin  wrote:
>
>> Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo 
>> cannot find using a CTRL-click in a different outline.  I copied this UNL 
>> right from the status bar:
>
>
> Thanks for your testing!
>
> I may have found and fixed this bug a few minutes ago.
>
> As of rev c6dc267 
> ,
>  
> the test cases in test.leo now work for me.
>
> Did this rev fix your problem?
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/81687547-4c0d-414d-b992-e4f53a9e06c0n%40googlegroups.com.


Re: Transliterate mypy into rust? Using ChatGPT??

2023-06-30 Thread Thomas Passin
I'd try for Julia, myself.  It's much more like Python, and reputedly very 
fast.  I think the program is too large to be easy to find all the things 
the ChatGPT would get plausible but wrong ...

On Friday, June 30, 2023 at 3:12:08 PM UTC-4 Edward K. Ream wrote:

> I've just asked this question 
>  of the mypy devs.
>
> Any comments? :-)
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f3de19bd-8e2e-4dfe-9fad-eb2379be9901n%40googlegroups.com.


Transliterate mypy into rust? Using ChatGPT??

2023-06-30 Thread Edward K. Ream
I've just asked this question  
of the mypy devs.

Any comments? :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/7f8e6eaf-2182-4777-9634-d2c7a53d3e4an%40googlegroups.com.


Re: PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 1:25 PM Thomas Passin  wrote:

> Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo
> cannot find using a CTRL-click in a different outline.  I copied this UNL
> right from the status bar:


Thanks for your testing!

I may have found and fixed this bug a few minutes ago.

As of rev c6dc267
,
the test cases in test.leo now work for me.

Did this rev fix your problem?

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2VrggvebhYgA524HaAqsgEo3UhuJeCjaEfLHLx_CWFnw%40mail.gmail.com.


PR3215 UNL Not Found By CTRL-Click

2023-06-30 Thread Thomas Passin
Testing the PR3215 branch, I stumbled onto this path-based UNL that Leo 
cannot find using a CTRL-click in a different outline.  I copied this UNL 
right from the status bar:

unl://C:/Tom/git/leo-editor/leo/core/LeoPyRef.leo#Code-->Gui base 
classes-->@file leoFind.py-->class LeoFind (LeoFind.py)-->LeoFind.Commands 
(immediate execution)-->find.find-def, do_find_def & helpers--><< compute 
the search table >>

The UNL is properly highlighted in the body it was pasted into.  I had 
enabled the setting @string unl-status-kind = legacy.

I wonder if it has to do with the comma embedded in the UNL.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/313d6f64-cebb-46f3-9dc3-4fc24ba81fd5n%40googlegroups.com.


Why is PR #3215 so large?

2023-06-30 Thread Edward K. Ream
 

PR #3215  is indeed 
large and complicated. Here are the reasons why:


1. It had to be. Many files use unls, some in unexpected ways.


2. There was no reason to be overly fastidious. I knew PR #3215 would 
succeed. Adding other PRs would have slowed me down.


3. Some changes could not be made outside the PR because they relied on 
code defined only in the PR.


4. The PR's size doesn't matter:


- Leo's *git-diff-pr* command creates an outline that you can search using 
cff. Want to see a deleted kwarg? Just search the Leonine diffs.

- *git bisect* will find the root of any bug anywhere in Leo's history.

*Summary*


PR #3215 inherently affects many files.


I knew that PR #3215 would succeed. There was no need to fear 
impossible-to-correct bugs.


Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b5b8a6c3-6e8f-4560-bb73-b04dcd2a0ee9n%40googlegroups.com.


Re: Edward K. Ream, Could you record some of your daily workflow?

2023-06-30 Thread Edward K. Ream
On Thu, Jun 29, 2023 at 6:35 AM HaveF HaveF  wrote:

> Dear, Edward K. Ream,
>
> I believe your daily workflows is an invaluable asset, as well as
> leo-editor.
>
> Even the doc and Leo files contain lots of information there, but there
> are still
> lack of your workflow of Leo.
>

Thanks for this question. I'll answer it when my work load is less than 10
hours/day :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3HxEVYQ%3Dun3ZdAvsfF5iVQ2AU9hiE0Y3nABr9AA7StZA%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 10:54 AM jkn  wrote:

> FWIW I usually run Leo from a direct desktop shortcut - having different
> command files to run with different command-line parameters is something
> ... unusual. I only ever do it if I have had a crash and am trying to see
> what is going on. Having a series of batch/sh files seems very ... 1990s to
> me...
>

Whatever works :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2MgDKNus%3DrcnP2i%3Dd7WYx56pjxCKQEk6gXk1tie3KoyA%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 10:44 AM Thomas Passin  wrote:

I just cycled Leo several time with this morning's update to PR3215.  My
> workbook remains intact, and the other session outlines re-opened.  (Not at
> the first launch:  only the workbook opened, not a surprise, I suppose).
>

Thanks for the testing!


> I suppose when I switch back to devel I'll be at risk of losing the
> workbook, but I do have a backup if that happens.
>

I doubt it. The failure was latent in devel. It took a seemingly-unrelated
failure concerning (new) gnxs for data to be lost.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0eCYLAvhWE-kBr0pKV%3DBK-PzZ%2B6wEU74KuOfLWWWQrAg%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread jkn
FWIW I usually run Leo from a direct desktop shortcut - having different 
command files to run with different command-line parameters is something 
... unusual. I only ever do it if I have had a crash and am trying to see 
what is going on. Having a series of batch/sh files seems very ... 1990s to 
me...

On Friday, June 30, 2023 at 3:01:24 PM UTC+1 Edward K. Ream wrote:

> On Fri, Jun 30, 2023 at 8:53 AM jkn wrote:
>
> The idea, n*ow fully realized* in PR #3215 
>> , is this:
>>
>> 1. On exit, Leo *always* saves a list of open outlines (automatic 
>> session-snapshot-save). 
>> 2. When you open Leo without specifying any files Leo opens the saved 
>> list of outlines (automatic session-snapshot-load).
>>
>>
>> That sounds reasonable enough. Might it be worth making (1) alterable via 
>> an @setting variable?
>>
>
> I'd rather not :-)
>
>> I can just see some scenario where you have a usual set of sessions 
>> saved, but want to have a 'scratch' session with a different set, or just 
>> one file or something.
>>
>
> Well, the "usual set" implies that a script file would work. For example, 
> I use scripts with names like 'e' (my personal outline), 't' (test.leo', 
> 'd' (LeoDocs.leo) and 's' (leoPy.leo).
>
> Yes. I *could* just always type 'leo', but that's two too many letters!
>
>> FWIW I rarely use session-snapshot-load, just when I change my 'default' 
>> session setup. So I would no longer need to do this.
>>
>
> As you say, there is a very slight advantage to doing session save/load 
> manually, but I don't think the advantage is worth yet another setting!
>
> I'll attempt to give this a try soon.
>>
>
> Great. Please tell us about your experience.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ec48f512-d370-4470-b848-23ec815b9d09n%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin

On Friday, June 30, 2023 at 10:01:24 AM UTC-4 Edward K. Ream wrote:

The idea, n*ow fully realized* in PR #3215 
, is this:

1. On exit, Leo *always* saves a list of open outlines (automatic 
session-snapshot-save). 
2. When you open Leo without specifying any files Leo opens the saved list 
of outlines (automatic session-snapshot-load).


I just cycled Leo several time with this morning's update to PR3215.  My 
workbook remains intact, and the other session outlines re-opened.  (Not at 
the first launch:  only the workbook opened, not a surprise, I suppose).  
So that's good.  I suppose when I switch back to devel I'll be at risk of 
losing the workbook, but I do have a backup if that happens. 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/b4803cf0-652c-4e43-989d-f55b8d3a6ad5n%40googlegroups.com.


Re: Status bar behavior, especially with PR 3215

2023-06-30 Thread Edward K. Ream
On Friday, June 30, 2023 at 10:00:52 AM UTC-5 Edward K. Ream wrote:

> How about changing the *Copy* item to *Copy All*.
> Let's just get rid of both. Selecting the text and doing Ctrl-C works now 
and is good enough.

Well, it doesn't look easy to get rid of these items. Let's just leave them 
alone.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/37fddd7e-523c-4ae3-b645-e6b39627c0d4n%40googlegroups.com.


Re: Status bar behavior, especially with PR 3215

2023-06-30 Thread Edward K. Ream
On Mon, Jun 26, 2023 at 9:55 PM Thomas Passin  wrote:

> In the status bar, a right-click brings up a two-item context menu: *Select
> All* and *Copy*.  I have always found this a little confusing.

...

> How about changing the *Copy* item to *Copy All*.


Let's just get rid of both. Selecting the text and doing Ctrl-C works now
and is good enough.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS29DzPJrZt4VkcnhpeOTXRD3iWd7BkDf0xudJ7oZZrrow%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 8:53 AM jkn wrote:

The idea, n*ow fully realized* in PR #3215
> , is this:
>
> 1. On exit, Leo *always* saves a list of open outlines (automatic
> session-snapshot-save).
> 2. When you open Leo without specifying any files Leo opens the saved list
> of outlines (automatic session-snapshot-load).
>
>
> That sounds reasonable enough. Might it be worth making (1) alterable via
> an @setting variable?
>

I'd rather not :-)

> I can just see some scenario where you have a usual set of sessions saved,
> but want to have a 'scratch' session with a different set, or just one file
> or something.
>

Well, the "usual set" implies that a script file would work. For example, I
use scripts with names like 'e' (my personal outline), 't' (test.leo', 'd'
(LeoDocs.leo) and 's' (leoPy.leo).

Yes. I *could* just always type 'leo', but that's two too many letters!

> FWIW I rarely use session-snapshot-load, just when I change my 'default'
> session setup. So I would no longer need to do this.
>

As you say, there is a very slight advantage to doing session save/load
manually, but I don't think the advantage is worth yet another setting!

I'll attempt to give this a try soon.
>

Great. Please tell us about your experience.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2ceXZuq1TDQNPu780xnB-EGKpp%2B1HCO7G5QATYwfK17A%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread jkn

Hi Edward

On Friday, June 30, 2023 at 1:41:08 PM UTC+1 Edward K. Ream wrote:

On Fri, Jun 30, 2023 at 5:04 AM jkn  wrote:

FWIW I can't really tell what #3408 will actually *do*. "Real Sessions" 
sounds great, but what is written there is more about the coding. I would 
like to better understand when the user experience will be at the end of 
this.


The idea, n*ow fully realized* in PR #3215 
, is this:

1. On exit, Leo *always* saves a list of open outlines (automatic 
session-snapshot-save). 
2. When you open Leo without specifying any files Leo opens the saved list 
of outlines (automatic session-snapshot-load).


That sounds reasonable enough. Might it be worth making (1) alterable via 
an @setting variable?

I can just see some scenario where you have a usual set of sessions saved, 
but want to have a 'scratch' session with a different set, or just one file 
or something.

FWIW I rarely use session-snapshot-load, just when I change my 'default' 
session setup. So I would no longer need to do this.

I'll attempt to give this a try soon.

Thanks
Jon


 

This scheme is what I understand to be real sessions. It's not *exactly* 
equivalent to *manually *doing session-snapshot-load because Leo always 
overwrites the previously saved session.

Please try this all out.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/32075821-dc0a-4fa9-9252-d9cf7b6e4958n%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 8:28 AM Thomas Passin wrote:

>> I actually do use the equivalent of custom temporary sessions sometimes,
but the way I do it is to use the command line.  I usually keep a Leo
window open all the time with maybe 5 or 6 outlines open (at a minimum, the
workbook, my bookmarks manager, and whatever outline I want to work with).
Sometimes I launch another copy with one or two outlines specified on the
command line.  Those command lines, in a second console, serve as de facto
sessions.  They are easy to bring back via the command line history, and I
can have several.  As long as the first instance of Leo stays open until
after those other ones are closed, then the session having the first Leo
instance's outlines will get reloaded the next time I start Leo.

> I use a different theme for the second Leo window so I can tell them
apart without needing to guess.
> This has been working well for me.

Thanks Thomas. I think many Leonistas will enjoy dead-simple sessions.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3aw5t8PJVjMqE0LXawZ_bmwEW%2Bv5ZYrxcdp23AXhYAvA%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin
Sorry, posted by mistake before I was finished.

On Friday, June 30, 2023 at 9:17:54 AM UTC-4 Thomas Passin wrote:

On Friday, June 30, 2023 at 9:00:13 AM UTC-4 Edward K. Ream wrote:

On Friday, June 30, 2023 at 7:54:48 AM UTC-5 Thomas wrote:

I think this is exactly what is wanted most of the time, especially if each 
of the session-loaded outlines gets navigated to the focus when Leo was 
last closed.

The trouble with having the user build and specify the contents of 
specially named sessions is that it's not only a nuisance to do, one 
quickly forgets what each session contains.


Thanks Thomas. That's how I see things too.

 

I actually do use the equivalent of custom temporary sessions sometimes, 
but the way I do it is to use the command line.  I usually keep a Leo 
window open all the time with maybe 5 or 6 outlines open (at a minimum, the 
workbook, my bookmarks manager, and whatever outline I want to work with).  
Sometimes I launch another copy with one or two outlines specified on the 
command line.  Those command lines, in a second console, serve as de facto 
sessions.  They are easy to bring back via the command line history, and I 
can have several.  As long as the first instance of Leo stays open until 
after those other ones are closed, then the session having the first Leo 
instance's outlines will get reloaded the next time I start Leo.


I use a different theme for the second Leo window so I can tell them apart 
without needing to guess. 

This has been working well for me.  

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ef6091b0-2b3d-4767-89cb-f5b8f966a40fn%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin

On Friday, June 30, 2023 at 9:00:13 AM UTC-4 Edward K. Ream wrote:

On Friday, June 30, 2023 at 7:54:48 AM UTC-5 Thomas wrote:

I think this is exactly what is wanted most of the time, especially if each 
of the session-loaded outlines gets navigated to the focus when Leo was 
last closed.

The trouble with having the user build and specify the contents of 
specially named sessions is that it's not only a nuisance to do, one 
quickly forgets what each session contains.


Thanks Thomas. That's how I see things too.


I actually do use the equivalent of custom temporary sessions sometimes, 
but the way I do it is to use the command line.  I usually keep Leo open

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/2cf88d66-0aa8-4df5-a8b0-2a408c0be6ffn%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Friday, June 30, 2023 at 5:04:54 AM UTC-5 jkn wrote:

titles like 'The SessionManager will go away' probably cause people to go 
"what?! Why?! When?!", which might not be what you want...


Hehe. It was exactly what I wanted--to get everyone's attention. 

I'm particularly glad I got *your* attention.

Edward 

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/580c7e4d-6486-4e78-a1d0-c31a8a3d09f9n%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream


On Friday, June 30, 2023 at 7:54:48 AM UTC-5 Thomas wrote:

I think this is exactly what is wanted most of the time, especially if each 
of the session-loaded outlines gets navigated to the focus when Leo was 
last closed.

The trouble with having the user build and specify the contents of 
specially named sessions is that it's not only a nuisance to do, one 
quickly forgets what each session contains.


Thanks Thomas. That's how I see things too.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/aed88a83-61d2-43c9-85e7-029d64567ad0n%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Thomas Passin

On Friday, June 30, 2023 at 8:41:08 AM UTC-4 Edward K. Ream wrote:

1. On exit, Leo *always* saves a list of open outlines (automatic 
session-snapshot-save).
2. When you open Leo without specifying any files Leo opens the saved list 
of outlines (automatic session-snapshot-load).


I think this is exactly what is wanted most of the time, especially if each 
of the session-loaded outlines gets navigated to the focus when Leo was 
last closed.

The trouble with having the user build and specify the contents of 
specially named sessions is that it's not only a nuisance to do, one 
quickly forgets what each session contains.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/107316c9-1667-4c47-8ba3-16e05f52dcfcn%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 5:04 AM jkn  wrote:

> FWIW I can't really tell what #3408 will actually *do*. "Real Sessions"
> sounds great, but what is written there is more about the coding. I would
> like to better understand when the user experience will be at the end of
> this.
>

The idea, n*ow fully realized* in PR #3215
, is this:

1. On exit, Leo *always* saves a list of open outlines (automatic
session-snapshot-save).
2. When you open Leo without specifying any files Leo opens the saved list
of outlines (automatic session-snapshot-load).

This scheme is what I understand to be real sessions. It's not *exactly*
equivalent to *manually *doing session-snapshot-load because Leo always
overwrites the previously saved session.

Please try this all out.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS3enVMHqMKec5xyo%2BhgvMewh3%2BRK_CqQnft%2BH8SPoPotA%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread jkn
FWIW I can't really tell what #3408 will actually *do*. "Real Sessions" 
sounds great, but what is written there is more about the coding. I would 
like to better understand when the user experience will be at the end of 
this.

(sorry if I seem like an ungrateful consumer of terrific free SW).

FWIW, conversation titles like 'The SessionManager will go away' probably 
cause people to go "what?! Why?! When?!", which might not be what you 
want...

Jon N


On Friday, June 30, 2023 at 10:39:52 AM UTC+1 jkn wrote:

> starting Leo via different sets of (for me) .sh files, for different 
> 'session sets of files' seems pretty cheesy in this day & age - sorry.
>
> I haven't yet taken a look at #3408, I will do so asap.
>
> Thanks, Jon N
>
>
> On Friday, June 30, 2023 at 9:20:54 AM UTC+1 Edward K. Ream wrote:
>
>> On Friday, June 30, 2023 at 3:12:44 AM UTC-5 Edward K. Ream wrote:
>>
>> > Would #3408  
>> work for you? In effect, #3404 would do these commands automatically.
>>
>> If "fluid" sessions don't work for you the obvious workflow is to create 
>> .sh/.cmd files starting Leo with specified sets of outlines.
>>
>> session-snapshot-load and session-snapshot-save can only ever save *one* 
>> set of outlines, so these two commands are much less flexible than .sh/.cmd 
>> files.
>>
>> Edward
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8d3636bf-8016-48a0-9f1f-90a9a07c055fn%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 4:39 AM jkn  wrote:

> starting Leo via different sets of (for me) .sh files, for different
> 'session sets of files' seems pretty cheesy in this day & age - sorry.
>

No worries. PR #3215 
(the massive PR) now supports real sessions!!!  With minimal changes to
leoSessions.py!

In other words:

- #3408  is complete!
- leoSession.leo can remain with only small changes to SM.get_session and
SM.load_session.
- All the session-* commands should work. Some will work better :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS2AaV9-%3DuGTwuKzHLbstopU4_tsqKgjwheS9LUExSxeYA%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread jkn
starting Leo via different sets of (for me) .sh files, for different 
'session sets of files' seems pretty cheesy in this day & age - sorry.

I haven't yet taken a look at #3408, I will do so asap.

Thanks, Jon N


On Friday, June 30, 2023 at 9:20:54 AM UTC+1 Edward K. Ream wrote:

> On Friday, June 30, 2023 at 3:12:44 AM UTC-5 Edward K. Ream wrote:
>
> > Would #3408  work 
> for you? In effect, #3404 would do these commands automatically.
>
> If "fluid" sessions don't work for you the obvious workflow is to create 
> .sh/.cmd files starting Leo with specified sets of outlines.
>
> session-snapshot-load and session-snapshot-save can only ever save *one* 
> set of outlines, so these two commands are much less flexible than .sh/.cmd 
> files.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/ac71360f-7dce-49ce-8a5c-27ef7daf60b3n%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Friday, June 30, 2023 at 2:45:17 AM UTC-5 Edward K. Ream wrote:

But nothing in leoSessions.py gives Leo such [real] sessions. The 
SessionManager class and the session-* commands must go.


Big sigh. It does not seem wise to the retire the SessionManager class as 
part of PR #3215 . So 
the PR must fix SM.load_session for now.

I'll wait and see whether #3408 
 (real sessions) will 
satisfy everyone. If so I'll retire leoSessions.py as part of the PR for 
#3408.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/851364c5-a18b-4794-b23e-eef18dc86bfcn%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Friday, June 30, 2023 at 3:12:44 AM UTC-5 Edward K. Ream wrote:

> Would #3408  work 
for you? In effect, #3404 would do these commands automatically.

If "fluid" sessions don't work for you the obvious workflow is to create 
.sh/.cmd files starting Leo with specified sets of outlines.

session-snapshot-load and session-snapshot-save can only ever save *one* 
set of outlines, so these two commands are much less flexible than .sh/.cmd 
files.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/8c0233a1-6d94-4753-844c-05b4788075c8n%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Fri, Jun 30, 2023 at 2:55 AM jkn  wrote:

I routinely start Leo with a set of files (four or five), previously saved
> via session-snapshot-load and session-snapshot-save. Unless I'm
> misunderstanding you, loss of this feature would be a serious blow to my
> leo productivity.
>

I see: session-snapshot-load and session-snapshot-save are less toxic than
the other session-* commands.

Would #3408  work for
you? In effect, #3404 would do these commands automatically.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/CAMF8tS0VC1L%2B%3DX%3DHE%2BBzx3wv%3DcVeSonv6f72rR3wYANnw_cyvQ%40mail.gmail.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread jkn
I'm not 100% clear what the revised functionality you propose would be ... 
but as one of (the) main people who requested some sort of session 
management, a few years back, I would strongly dislike losing this feature.

I routinely start Leo with a set of files (four or five), previously saved 
via session-snapshot-load and session-snapshot-save. Unless I'm 
misunderstanding you, loss of this feature would be a serious blow to my 
leo productivity.

Jon N


On Friday, June 30, 2023 at 8:45:17 AM UTC+1 Edward K. Ream wrote:

> On Thursday, June 29, 2023 at 5:06:37 PM UTC-5 Edward K. Ream wrote:
>
> The *session-** commands are absurd solutions to a non-existent problem. 
> This class significantly complicates Leo's startup logic. The entire 
> SessionManager class must go. Félix take note :-)
>
>
> The *session-** commands are absurd solutions to a non-existent problem. 
> This class significantly complicates Leo's startup logic. The entire 
> SessionManager class must go. Félix take note :-)
>
>
> Thanks to all who have commented.
>
>
> Yes, Leo could have "real" sessions. When no files appear on the command 
> line, Leo could reload the open outlines when Leo last closed. Issue #3408 
>  tells how. It's 
> easy! It's on the list for Leo 6.7.4.
>
>
> But nothing in leoSessions.py gives Leo such sessions. The SessionManager 
> class and the session-* commands must go.
>
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f9a5d001-a2a7-499e-af3a-e498677f55abn%40googlegroups.com.


Re: Heads up: The SessionManager class will go away

2023-06-30 Thread Edward K. Ream
On Thursday, June 29, 2023 at 5:06:37 PM UTC-5 Edward K. Ream wrote:

The *session-** commands are absurd solutions to a non-existent problem. 
This class significantly complicates Leo's startup logic. The entire 
SessionManager class must go. Félix take note :-)


The *session-** commands are absurd solutions to a non-existent problem. 
This class significantly complicates Leo's startup logic. The entire 
SessionManager class must go. Félix take note :-)


Thanks to all who have commented.


Yes, Leo could have "real" sessions. When no files appear on the command 
line, Leo could reload the open outlines when Leo last closed. Issue #3408 
 tells how. It's 
easy! It's on the list for Leo 6.7.4.


But nothing in leoSessions.py gives Leo such sessions. The SessionManager 
class and the session-* commands must go.


Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/f559127f-9563-4f7d-934a-15e037db169bn%40googlegroups.com.