There is no built in command to do what you want.  What is natively
available is

(a) paste-retaining-clones, which, in the case of your example, would
be the same as invoking Control-` (with the default key bindings).
(b) past-node, which generates new versions of a node and all its
descendants, although it creates parallel clone relationships among
the descendant nodes.

If Google groups doesn't mangle this, you could copy it and "paste-
node" (Control-Shift-V) it into your outline, select it, and then
click "script-button", after which you'd have a button that I believe
does what you want:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet ekr_test?>
<leo_file>
<leo_header file_format="2"/>
<vnodes>
<v t="sps.20100714114026.7366"><vh>@button Copy node, retaining child
nodes as clones</vh></v>
</vnodes>
<tnodes>
<t tx="sps.20100714114026.7366">@language python
c.endEditing()
current_node=c.p
u=c.undoer
op_name="Copy node, retaining child nodes as clones"
u.beforeChangeGroup(current_node, op_name)
undoData=u.beforeInsertNode(current_node)
new_node_position=current_node.insertAfter()
new_node_position.setDirty(setDescendentsDirty=False)
dirtyVnodeList = p.setAllAncestorAtFileNodesDirty()
c.setChanged(True)
u.afterInsertNode(new_node_position,op_name,undoData,dirtyVnodeList=dirtyVnodeList)
for p1 in current_node.children_iter():
    undoData = u.beforeCloneNode(p1)
    p2 = p1.clone()
    u.afterCloneNode(p2,op_name,undoData)
    undoData = u.beforeMoveNode(p2)
    p2.moveToLastChildOf(new_node_position)
    u.afterMoveNode(p2,op_name,undoData)
u.afterChangeGroup(c.p,op_name)
c.redrawAndEdit(new_node_position,selectAll=True)
</t>
</tnodes>
</leo_file>

If Google groups does mangle it, you shouldn't have too hard a time
reproducing it quasi-manually.

    - Stephen


On Jul 14, 12:00 am, "Zoom.Quiet" <[email protected]> wrote:
> i'm livin Leo, all kinds of export base Leo; even blogging
> so i usage PyBlosxom; and usage text2tags as format;
> so there is some block is same in every entry,
> so base Leo clone is cool and perfect!
> BUT!
> when i copy old entry as new, clone node losted clone!
> as atta.
> - py4sa-off-wacom-touch-2010-07-14-10-22.t2t is one old entry
> - every entry make same structure; means <<t2t head>> <<t2t foot>> is same
> - so Ctrl+Shift+C and Ctrl+Shift+V copy the node as
> py4sa-book-read-2010-07-14-12-32.t2t new entry
> - that cloned node all losted clone attribute
>
> what happen? and how can i easy copy node as other node,and keep the
> sub node clone attribute ??
>
> --http://zoomquiet.org人生苦短? Pythonic!
>
>  zoomq-2010-07-14-115731_443x142_scrot.png
> 17KViewDownload

-- 
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