I have just bumped into an unusual situation and I want to share it to get some feedback.
I've opened an old pet project of mine (last commit was 2011-06-20 so it's been a while). It consists of a leo outline (let's call it outline.leo for convenience) + a src/ directory which contains a source code file (let's call it code.py) outline.leo has this in its header: <leo_header file_format="2" Outline structure is pretty simple: I have a "@path src" node for the src directory and a "@thin code.py" subnode of it. Here is what I see in log pane when I'm opening outline.leo (I will be replacing long absolute paths with relative ones for convenience): --- snip --- reading: outline.leo reading: @thin code.py No @+leo sentinel in: src/code.py can not read 3.x derived file src/code.py you may upgrade these file using Leo 4.0 through 4.4.x --- snip --- First thing I did was to have a look at code.py. It had no setinels in it indeed, but frankly, I forgot why. If the last two lines are related to it - fine, though the hint about upgrading file is not understandable. But well, I remember leo has shadow files, so I thought I may try getting code.py into outline that way. I replaced "@thin code.py" with "@shadow code.py". Obviously, I had to save changes. This is what I saw in log pane: --- snip --- created directory: src/.leo_username created: src/.leo_username/xcode.py wrote: src/code.py saved: outline.leo --- snip --- No confirmation dialog was displayed. I looked at code.py externally after that and was surprised to see... that it was empty! Now, I have some settings in myLeoSettings.leo, but I'm pretty sure there's nothing that looks like explicit disabling of confirmation dialog when writing files and there's a risk of overwriting some and get data loss. Summary: 1. My workflow was dictated by common sense, yet I got data loss. If I did something weird, please point me to it. 2. No real data loss occurred - I had all my files in version control so I just checked out latest revision into workspace (I'm using fossil as version control for this project but this is probably totally irrelevant). 3. I could probably repeat the workflow, save outline (and get code.py deleted again), then restore code.py from repository and restart leo to see if it gets slurped into the outline by @shadow, but this looks like an ugly hack so I decided to ask here first. Your comments please. -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To view this discussion on the web visit https://groups.google.com/d/msg/leo-editor/-/11LqdELj3_UJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
