I get the same behaviour. I thought might be because Leo detected a
syntax error or something in the code, but it persists when I use .txt
instead of .py.  I encourage you to file a bug.

Copy & paste as node (ctrl-shift-v) the following into leo to reproduce:

<?xml version="1.0" encoding="utf-8"?>
<!-- Created by Leo (http://webpages.charter.net/edreamleo/front.html) -->
<?xml-stylesheet ekr_test?>
<leo_file xmlns:leo="http://www.leo-editor.org/2011/leo"; >
<leo_header file_format="2"/>
<vnodes>
<v t="maphew.20120705210033.1396" a="E"><vh>@file myCode.txt</vh>
<v t="maphew.20120705210033.1397" a="E"><vh>function 1</vh>
<v t="maphew.20120705210033.1399"><vh>block 1</vh></v>
<v t="maphew.20120705210033.1400" a="E"><vh>block 2</vh>
<v t="maphew.20120705210033.1401"><vh>block 2, sub 1</vh></v>
</v>
</v>
<v t="maphew.20120705210033.1398" a="E"><vh>func2</vh>
<v t="maphew.20120705210033.1402"><vh>func2, block 1</vh></v>
<v t="maphew.20120705210033.1400" a="E"></v>
</v>
</v>
</vnodes>
<tnodes>
<t tx="maphew.20120705210033.1396">Attempt to reproduce something
reported by Felix74 on leo-editor. Given the following structure, why
does the clone `codeBlock1b` (and children), not get written to
myCode.py in function2?

function1
    codeBlock1a
    codeBlock1b
        codeBlock1bi
function2
    codeBlock2a
    codeBlock1b(clone)

@others
    </t>
<t tx="maphew.20120705210033.1397">this is func1
</t>
<t tx="maphew.20120705210033.1398">this is func 2
</t>
<t tx="maphew.20120705210033.1399">this is func1, code block 1

</t>
<t tx="maphew.20120705210033.1400">this is func1, code block 2
it is a clone
</t>
<t tx="maphew.20120705210033.1401">this is func1, block2, sub1
a child of a clone</t>
<t tx="maphew.20120705210033.1402">this is func2, block 1
it should be followed by a clone, block 2, from func1.
And indeed it is in the leo file, but not in the @file.</t>
</tnodes>
</leo_file>



On Sun, Jul 1, 2012 at 10:16 PM, felix74 <[email protected]> wrote:
> Just started using leo and have the following problem creating python
> program using @file
>
> Outline
> =====
>
> @file myCode.py
>     function1
>         codeBlock1a
>         codeBlock1b
>             codeBlock1bi
>     function2
>         codeBlock2a
>         codeBlock1b(clone)
>
>
> when the file myCode.py is created function1 contains all the code in
> codeBlock1a and codeBlock1b(+ subnodes).
> However, function2 only shows codeBlock2a and codeBlock1b(+ subnodes) are
> missing from myCode.py.
>
> How do I get codeBlock1b(+subnodes) to be output to file myCode.py in
> function2? I am using @others to insert codeBlock(s) into the file. All the
> code that goes into myCode.py is created inside leo.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
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