On Saturday, March 17, 2012 2:26:55 PM UTC+2, Edward K. Ream wrote:
>
> On Fri, Mar 16, 2012 at 7:51 PM, zpcspm wrote:
>
> > I replaced "@thin code.py" with "@shadow code.py".
>
> Oh my.  You are asking for loads of trouble do this.
>
My confusion about deleted content in code.py comes from the assumption 
that since I didn't modify the content of code.py explicitly - I was 
expecting leo to not modify it behind the curtain. I didn't use shadow 
files extensively, but I always saw creating shadow nodes as "symlinking" 
external files into an outline. Ok, it would be fine to get their content 
changed, but only if I would do it explicitly (which I didn't). Are these 
assumptions of mine flawed somehow?
 

> Why not simply use the import command to recreate your code?
>
>
>  This option just didn't cross my mind, I have tried it now and here's my 
feedback:

- leo added a "@language unknown_language" at the top of imported code.py, 
even if first line of it starts with "#!/usr/bin/env python". I am not sure 
this has any negative implications, since at least code highlight works and 
indentation wasn't broken
- leo added the imported file as "@file" node with absolute path. I am a 
bit worried about how would this work for larger projects with multiple 
files. Wouldn't the outline structure get broken if the working directory 
is moved to another place (another directory, eventually another computer)? 
Of course this is pure speculation without trying, but after shooting 
myself in the foot once, I'd rather ask than try something else that "makes 
sense".
- leo added the imported file as single node, didn't put each function into 
its own subnode

I am still leaning towards trying the ugly hack instead (the one that I 
mentioned in my previous post).

And I want to emphasize that this is not a feature request that should make 
leo work as I want in my particular case. I am rather trying to avoid 
getting a bad habit (replacing @thin nodes with @shadow ones), since this 
proved to be a wrong approach due to data loss. 

-- 
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/-/JT_3pqN1UIoJ.
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.

Reply via email to