On Mon, Sep 16, 2024 at 5:38 AM 'rengel' via leo-editor <
leo-editor@googlegroups.com> wrote:

> Thanks for your suggestion!
>
> But this is the only node. In its body text it contains hundreds of othe
> nodes wrapped in an xml file. So deleting that node would delete all the
> contents of this Leo file.
>

Leo will create a .leo file containing just an @edit node in some
circumstances. I think that may have been what happened.

To see all the places where that happens, do a cff on "@edit" (body only).

The most likely possibilities:

- Importing a .txt file: LeoQTreeWidget.createAtFileNode
- Creating a file from a url as part of a drag and drop:
LeoQTreeWidget.doFileUrlHelper & helper
- Trying to open a bad .leo file: LM.openBadLeoFile.
- Opening an external file: LM.openExternalFile.
- Opening a file from a script: g/LM.openWithFileName.
- Opening a file from a recursive import script: ric.import_one_file.

Leo reads .xml (.leo) files correctly (with all necessary xml escapes), but
if Leo won't handle xml escapes if Leo thinks it is importing a .txt file.

In short, something strange happened :-)  There is little or no chance that
Leo's code that reads/writes .leo files is buggy.

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/CAMF8tS3LSRcvjG4_riA2%3DcebwSk7naerSPF7qKU8qB1j%3DdSV4g%40mail.gmail.com.

Reply via email to