Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-29 Thread Edward K. Ream
On Thu, Jun 29, 2023 at 4:41 PM Thomas Passin  wrote:

> Even though I dislike PRs that are very complicated and try to do too many
> things, I have to agree in this case.
>

Thanks :-)

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/CAMF8tS3fsw22JKuM4rYxOJvL%2BZcFzthYzCC8aF-L7s5hvMQ_1Q%40mail.gmail.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-29 Thread Thomas Passin
Even though I dislike PRs that are very complicated and try to do too many 
things, I have to agree in this case.

On Thursday, June 29, 2023 at 5:37:32 PM UTC-4 Edward K. Ream wrote:

> On Thursday, June 29, 2023 at 3:43:22 AM UTC-5 Edward K. Ream wrote:
>
> > See #3404 . The 
> first comment of the issue discusses the failure and how to fix it.
> > PR #3215  may as 
> well clean up the mess.
> >> On second thought, a new PR will make testing easier...
>
> My first thought was correct. All work must be done in PR #3215. Only that 
> PR has the new methods.
>
> 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/d5a7ae76-8d10-4fcf-bc4f-37b15c86032dn%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-29 Thread Edward K. Ream
On Thursday, June 29, 2023 at 3:43:22 AM UTC-5 Edward K. Ream wrote:

> See #3404 . The 
first comment of the issue discusses the failure and how to fix it.
> PR #3215  may as well 
clean up the mess.
>> On second thought, a new PR will make testing easier...

My first thought was correct. All work must be done in PR #3215. Only that 
PR has the new methods.

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/9c9bfb3d-ed4f-49ca-ae5b-8860a74ddc7fn%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-29 Thread Edward K. Ream
On Thursday, June 29, 2023 at 2:10:26 AM UTC-5 Edward K. Ream wrote:
 

See #3404 . The first 
comment of the issue discusses the failure and how to fix it.

... 

PR #3215  may as well 
clean up the mess.


On second thought, a new PR will make testing easier, even if the new PR 
eventually gets merged into PR #3215.

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/ebf8f7fa-f2ee-4c28-a08e-b081c718ea44n%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-29 Thread Edward K. Ream
On Tuesday, June 27, 2023 at 4:55:37 PM UTC-5 Thomas wrote:

> I haven't filed an issue on this yet because I haven't got all the 
conditions nailed down.  

See #3404 . The first 
comment of the issue discusses the failure and how to fix it.

The short version: Leo's startup code should not use unls! The fix should 
be straightforward.

PR #3215  may as well 
clean up the mess.

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/c276fcaf-370c-4a55-b200-517a00be5ec0n%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 3:15 PM Thomas Passin  wrote:

one defensive code change to make is for Leo never to replace the workbook
> - whether or not it can find it - without asking the user.  On first use,
> when the Leo user gets created, that wouldn't apply.


Good idea.

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/CAMF8tS3FAnKL1hX_bUMuyx9r%2B7G9ukUNFA3ukCHVsB2_3Bb%2BKQ%40mail.gmail.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
I agree, but with a non-reproducible report it's hard to make any 
progress.  In this case I wanted to be able to file a more definite issue, 
but also alert people as soon as possible to back up their workbooks until 
the thing gets resolved.  

I do think that one defensive code change to make is for Leo never to 
replace the workbook - whether or not it can find it - without asking the 
user.  On first use, when the Leo user gets created, that wouldn't apply.

On Wednesday, June 28, 2023 at 3:48:14 PM UTC-4 gates...@gmail.com wrote:

> I'd like to propose that *any* data corruption issue at all in Leo should 
> be reported, regardless of whether the steps to replicate are known.  The 
> last thing an editor should ever do is destroy data.
>
> Jake
>
> On Wed, Jun 28, 2023 at 1:49 PM Thomas Passin  wrote:
>
>>
>> On Wednesday, June 28, 2023 at 11:42:37 AM UTC-4 Edward K. Ream wrote:
>>
>> On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin  wrote:
>>
>> I've done more testing, and the pattern is definitely repeatable.  If I 
>> check out the  ekr-3181-mypy-links branch, the first time I launch Leo 
>> the workbook may not be affected but every time after that it is destroyed 
>> and replaced by the default CheatSheet.  When I change back to the devel 
>> branch, the first launch after that also replaces the workbook, but after 
>> that the workbook is opened without replacement.  Remember, in these trials 
>> after each time the workbook gets replaced, I restore it from backup for 
>> the next launch.
>>
>> The replacement does not happen if I specify the workbook on the command 
>> line.  Clearing the recent files list had no effect on the behavior.  
>> Nether did deleting the .leo\db directory.
>>
>>
>> Thanks for this report.  Please file an issue, if you haven't done so. 
>> This issue will have high priority.
>>
>>
>> Done: #3404 
>>
>> -- 
>> 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+...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/leo-editor/e337e8c2-ba2f-46c3-9780-0154dc9e5e9en%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/765c1c72-a22e-44e6-a0e4-3cdc35bd7b5en%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Jacob Peck
I'd like to propose that *any* data corruption issue at all in Leo should
be reported, regardless of whether the steps to replicate are known.  The
last thing an editor should ever do is destroy data.

Jake

On Wed, Jun 28, 2023 at 1:49 PM Thomas Passin  wrote:

>
> On Wednesday, June 28, 2023 at 11:42:37 AM UTC-4 Edward K. Ream wrote:
>
> On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin  wrote:
>
> I've done more testing, and the pattern is definitely repeatable.  If I
> check out the  ekr-3181-mypy-links branch, the first time I launch Leo
> the workbook may not be affected but every time after that it is destroyed
> and replaced by the default CheatSheet.  When I change back to the devel
> branch, the first launch after that also replaces the workbook, but after
> that the workbook is opened without replacement.  Remember, in these trials
> after each time the workbook gets replaced, I restore it from backup for
> the next launch.
>
> The replacement does not happen if I specify the workbook on the command
> line.  Clearing the recent files list had no effect on the behavior.
> Nether did deleting the .leo\db directory.
>
>
> Thanks for this report.  Please file an issue, if you haven't done so.
> This issue will have high priority.
>
>
> Done: #3404 
>
> --
> 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/e337e8c2-ba2f-46c3-9780-0154dc9e5e9en%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/CAJ1i%2BSbJ20_Jsk0KheiybBpzifF5XCe-WGYFgWbJoofxHwPxXw%40mail.gmail.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin

On Wednesday, June 28, 2023 at 11:42:37 AM UTC-4 Edward K. Ream wrote:

On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin  wrote:

I've done more testing, and the pattern is definitely repeatable.  If I 
check out the  ekr-3181-mypy-links branch, the first time I launch Leo the 
workbook may not be affected but every time after that it is destroyed and 
replaced by the default CheatSheet.  When I change back to the devel 
branch, the first launch after that also replaces the workbook, but after 
that the workbook is opened without replacement.  Remember, in these trials 
after each time the workbook gets replaced, I restore it from backup for 
the next launch.

The replacement does not happen if I specify the workbook on the command 
line.  Clearing the recent files list had no effect on the behavior.  
Nether did deleting the .leo\db directory.


Thanks for this report.  Please file an issue, if you haven't done so. This 
issue will have high priority.


Done: #3404 

-- 
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/e337e8c2-ba2f-46c3-9780-0154dc9e5e9en%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
On Wednesday, June 28, 2023 at 12:52:42 PM UTC-4 jkn wrote:

FWIW, I have a vague feeling that something like this happened to me a few 
months ago. It only occurred the once, and I am not 100% sure what 
happened, but it definitely involved the CheatSheet 'appearing'.

Only mentioning it because this would have been before the recent work.


I did too, but it didn't repeat and I couldn't find a way to induce it.

-- 
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/404dc8c2-ef21-4843-8a31-532df94c3b62n%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread jkn
FWIW, I have a vague feeling that something like this happened to me a few 
months ago. It only occurred the once, and I am not 100% sure what 
happened, but it definitely involved the CheatSheet 'appearing'.

Only mentioning it because this would have been before the recent work.

J^n

On Wednesday, June 28, 2023 at 4:42:37 PM UTC+1 Edward K. Ream wrote:

> On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin  wrote:
>
>> I've done more testing, and the pattern is definitely repeatable.  If I 
>> check out the  ekr-3181-mypy-links branch, the first time I launch Leo 
>> the workbook may not be affected but every time after that it is destroyed 
>> and replaced by the default CheatSheet.  When I change back to the devel 
>> branch, the first launch after that also replaces the workbook, but after 
>> that the workbook is opened without replacement.  Remember, in these trials 
>> after each time the workbook gets replaced, I restore it from backup for 
>> the next launch.
>>
>> The replacement does not happen if I specify the workbook on the command 
>> line.  Clearing the recent files list had no effect on the behavior.  
>> Nether did deleting the .leo\db directory.
>>
>
> Thanks for this report.  Please file an issue, if you haven't done so. 
> This issue will have high priority.
>
> 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/816faed6-426b-415b-976c-8988282e14edn%40googlegroups.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Edward K. Ream
On Wed, Jun 28, 2023 at 10:27 AM Thomas Passin  wrote:

> I've done more testing, and the pattern is definitely repeatable.  If I
> check out the  ekr-3181-mypy-links branch, the first time I launch Leo
> the workbook may not be affected but every time after that it is destroyed
> and replaced by the default CheatSheet.  When I change back to the devel
> branch, the first launch after that also replaces the workbook, but after
> that the workbook is opened without replacement.  Remember, in these trials
> after each time the workbook gets replaced, I restore it from backup for
> the next launch.
>
> The replacement does not happen if I specify the workbook on the command
> line.  Clearing the recent files list had no effect on the behavior.
> Nether did deleting the .leo\db directory.
>

Thanks for this report.  Please file an issue, if you haven't done so. This
issue will have high priority.

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/CAMF8tS36NgY7Sq7ZfQ3ba1EWpWHiBZ%2Bpn60c4fWxNn-USfBVLg%40mail.gmail.com.


Re: Heads Up - My Workbook Is Getting Destroyed

2023-06-28 Thread Thomas Passin
I've done more testing, and the pattern is definitely repeatable.  If I 
check out the  ekr-3181-mypy-links branch, the first time I launch Leo the 
workbook may not be affected but every time after that it is destroyed and 
replaced by the default CheatSheet.  When I change back to the devel 
branch, the first launch after that also replaces the workbook, but after 
that the workbook is opened without replacement.  Remember, in these trials 
after each time the workbook gets replaced, I restore it from backup for 
the next launch.

The replacement does not happen if I specify the workbook on the command 
line.  Clearing the recent files list had no effect on the behavior.  
Nether did deleting the .leo\db directory.

On Tuesday, June 27, 2023 at 5:55:37 PM UTC-4 Thomas Passin wrote:

> I haven't filed an issue on this yet because I haven't got all the 
> conditions nailed down.  But Leo has been replacing my workbook with the 
> default CheatSheet ... sometimes.  *Please* make sure you have a backup 
> copy until this gets resolved.
>
> I noticed this behavior while I was testing code with the branch 
>
> Leo 6.7.4-devel, ekr-3181-mypy-links branch, build b9a9205ae9
>
> This is the branch with with all the new unl code.  I'm not sure if it can 
> also occur on the devel branch.
>
> The problem is that this behavior seems to happen suddenly.  Once it 
> starts, every time I launch Leo with this command line, the workbook.leo 
> outline gets replaced:
>
> py -m leo.core.runLeo
>
> If I include the name of the outline the outline does not get replaced:
>
> py -m leo.core.runLeo .leo\workbook.leo
>
> When the outline gets replaced, I noticed that the other outlines that 
> were opened previously did not get opened.  This made me think that the 
> database was getting corrupted.  But I deleted the .leo\db directory and 
> the workbook still got deleted.
>
> I think that something the the experimental branch is corrupting some 
> string, maybe of the recent files list.  This prevents Leo from finding the 
> workbook.  So it creates a new one.  I have observed that changing back to 
> the devel branch does not stop this behavior on the first launch, but after 
> I run Leo once in devel and then restore the workbook from backup, after 
> that Leo behaves normally and does not replace the workbook.  When I switch 
> back to the experimental branch, that's when this problem starts happening 
> again.
>
> I suggest that if Leo cannot find the workbook when it wants to open it, 
> it should notify the user that it can't find it and ask if it should create 
> a default workbook.  The user will probably say "no!" since they will know 
> that they want to keep the existing one.
>
> Of course, the problem should be fixed, but this would prevent the loss of 
> the workbook in case of future bugs as well.  I don't know about you, but I 
> have a lot of work in my workbook that I really don't want to lose.
>
> I was saved by Leo's new automatic backup, so I had a workbook.leo.bak 
> file when I first realized realized the problem. (Yes, I do back up the 
> .leo directory, but not recently enough this time).
>

-- 
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/b9edd250-0a69-413c-b286-2254f0a1ed37n%40googlegroups.com.


Heads Up - My Workbook Is Getting Destroyed

2023-06-27 Thread Thomas Passin
I haven't filed an issue on this yet because I haven't got all the 
conditions nailed down.  But Leo has been replacing my workbook with the 
default CheatSheet ... sometimes.  *Please* make sure you have a backup 
copy until this gets resolved.

I noticed this behavior while I was testing code with the branch 

Leo 6.7.4-devel, ekr-3181-mypy-links branch, build b9a9205ae9

This is the branch with with all the new unl code.  I'm not sure if it can 
also occur on the devel branch.

The problem is that this behavior seems to happen suddenly.  Once it 
starts, every time I launch Leo with this command line, the workbook.leo 
outline gets replaced:

py -m leo.core.runLeo

If I include the name of the outline the outline does not get replaced:

py -m leo.core.runLeo .leo\workbook.leo

When the outline gets replaced, I noticed that the other outlines that were 
opened previously did not get opened.  This made me think that the database 
was getting corrupted.  But I deleted the .leo\db directory and the 
workbook still got deleted.

I think that something the the experimental branch is corrupting some 
string, maybe of the recent files list.  This prevents Leo from finding the 
workbook.  So it creates a new one.  I have observed that changing back to 
the devel branch does not stop this behavior on the first launch, but after 
I run Leo once in devel and then restore the workbook from backup, after 
that Leo behaves normally and does not replace the workbook.  When I switch 
back to the experimental branch, that's when this problem starts happening 
again.

I suggest that if Leo cannot find the workbook when it wants to open it, it 
should notify the user that it can't find it and ask if it should create a 
default workbook.  The user will probably say "no!" since they will know 
that they want to keep the existing one.

Of course, the problem should be fixed, but this would prevent the loss of 
the workbook in case of future bugs as well.  I don't know about you, but I 
have a lot of work in my workbook that I really don't want to lose.

I was saved by Leo's new automatic backup, so I had a workbook.leo.bak file 
when I first realized realized the problem. (Yes, I do back up the .leo 
directory, but not recently enough this time).

-- 
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/bec70551-834a-46cc-90d6-fa1c4d344b73n%40googlegroups.com.