It turns out that this clone issue was discussed several years ago and I 
had completely forgotten about it, maybe because I haven't used *@auto-xxx* 
nodes 
or *@presistence* nodes.   See 
https://groups.google.com/g/leo-editor/c/oKGhRhUVTXA/m/xqUHMJzWAQAJ (thank 
you LewisNeal). But perhaps this is not the issue the OP has been 
encountering? 

On Wednesday, May 24, 2023 at 10:47:19 AM UTC-4 Thomas Passin wrote:

> The GitHub issue is 3355 
> <https://github.com/leo-editor/leo-editor/issues/3355>.
>
> On Wednesday, May 24, 2023 at 10:40:25 AM UTC-4 Thomas Passin wrote:
>
>> The loss of clones is specific to *@auto-md* trees (although I have not 
>> tested other *@auto-xx* trees):
>>
>> In an outline with both *@clean* and an *@auto-md* trees, when the 
>> outline is closed and re-opened, the clone nodes of the *@clean* tree 
>> remained but the clone nodes of the *@auto-md* tree were no longer 
>> clones.
>>
>> I don't know what the original intention was with respect to *@auto-md 
>> *trees, 
>> but this seems like a serious bug to me.  I'll create an issue for it.
>>
>> On Wednesday, May 24, 2023 at 10:10:34 AM UTC-4 Thomas Passin wrote:
>>
>>> I see where the problem is - or at least *a* problem - is, and it's 
>>> serious. The problem I see is that when an outline with clones is 
>>> re-opened, the clones are no longer clones.  This did not happen when I 
>>> created some clones in my Workbook, so there are some conditions yet to be 
>>> determined. I'll experiment some more to try to pin it down.  The outline 
>>> which showed the problem had both an *@auto-md* and an *@clean* tree.  
>>> I'll try outlines with them separately and report back.
>>>
>>> On Wednesday, May 24, 2023 at 8:22:58 AM UTC-4 Thomas Passin wrote:
>>>
>>>> @Edward recently re-worked some of the importers.  If you can use the 
>>>> current version of the devel branch (in GitHub) it would be worth trying.  
>>>> Can you share a tree that suffers from the problem?  Or a minimal version 
>>>> that does?
>>>>
>>>> On Wednesday, May 24, 2023 at 5:12:30 AM UTC-4 p.os...@datec.at wrote:
>>>>
>>>>> Sorry, it's Leo 6.6.4 on Arch Linux.
>>>>>
>>>>> On Tuesday, May 23, 2023 at 8:17:44 PM UTC+2 tbp1...@gmail.com wrote:
>>>>>
>>>>>> I tried out what you wrote and didn't get an error with an *@auto-md* 
>>>>>> file.  It is only a tiny, simple file so maybe it's not enough of a 
>>>>>> test.  
>>>>>> Here is what I did:
>>>>>>
>>>>>> 1. Created an @auto-md file with the following structure:
>>>>>>
>>>>>> @clean c:\temp\leo\md-test-at-auto-md.md
>>>>>>     Markdown Test Tree
>>>>>>         A1
>>>>>>             A1.1
>>>>>>                 A1.1.1
>>>>>>         A2
>>>>>>
>>>>>> 2. I added a line *@others *to the top of the body of the top node.  
>>>>>> I wrote a line or two for most of the nodes.  Then I saved the outline.
>>>>>> 3. I added a new top-level node outside the *@auto-md* node.  I 
>>>>>> cloned node *A1* into it.
>>>>>> 4. In the cloned *A1.1* node, I added a new line.
>>>>>> 5. I observed in an external editor that the *@auto-md* file had the 
>>>>>> intended change.
>>>>>> 6. I closed and reopened the outline.
>>>>>> 7.  I did not see any corruption in the outline.
>>>>>>
>>>>>> Could you write more detail about the *@auto-md* file that ended up 
>>>>>> with a corrupted outline, and whether you use an *@others* line in 
>>>>>> it?  And is this the only such file that caused a problem?  And also the 
>>>>>> version of Leo and the OS (though it doesn't seem likely that the OS is 
>>>>>> playing a part).
>>>>>> On Tuesday, May 23, 2023 at 1:58:13 PM UTC-4 Thomas Passin wrote:
>>>>>>
>>>>>>> Maybe @clean or even @file would work for you (not that I've tried 
>>>>>>> them with clones, which I'll try out soon) instead of @auto-md.  I 
>>>>>>> don't 
>>>>>>> think  that @auto-md really gets you anything that they don't, although 
>>>>>>> you 
>>>>>>> will need to put *@language md* at  the start of the body of the 
>>>>>>> top node.
>>>>>>>
>>>>>>> On Tuesday, May 23, 2023 at 12:51:48 PM UTC-4 p.os...@datec.at 
>>>>>>> wrote:
>>>>>>>
>>>>>>>> An example:
>>>>>>>>
>>>>>>>> @auto-md file1.md
>>>>>>>>     clone-node_1
>>>>>>>>     clone-node_2
>>>>>>>>
>>>>>>>> @auto-md file2.md
>>>>>>>>     clone-node_1
>>>>>>>>     clone-node_2
>>>>>>>>
>>>>>>>> Changes in a clone causes (don't know exactly when, probably when 
>>>>>>>> reading the LEO file) that the tree hierarchy is partially destroyed. 
>>>>>>>> The 
>>>>>>>> content remains, but ends up in a node that didn't exist before and 
>>>>>>>> whose 
>>>>>>>> heading consists of parts of the content.
>>>>>>>>
>>>>>>>> I think this could be prevented if @auto-md would only write. Do I 
>>>>>>>> see that right? And can I force this somehow?
>>>>>>>>
>>>>>>>> Best regards
>>>>>>>> Paul
>>>>>>>
>>>>>>>

-- 
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/a6920b50-7ee8-41e2-ab9c-9081d02aa551n%40googlegroups.com.

Reply via email to