On Monday, January 27, 2014 7:10:24 AM UTC-5, Edward K. Ream wrote:>

> I expect several hours of work remain before the at-file-to-at-auto 
command works on all of Leo's @file nodes.

I hit the post button by mistake.

Yesterday got bogged down in fixing bugs. At present, converting 
leoGlobals.py from an @file to an @auto tree fails for several reasons:

1. Switching headlines is really complicated: it affects all aspects of unl 
handling, and thus all aspects of associating unls with actual positions in 
the just-imported outline.  More work is like needed.  In particular, some 
existing organizer nodes are not being linked because the headline in the 
@file tree doesn't match the headline in the imported @file tree.

The present code *does* set v._imported_headline for all nodes in the @file 
tree before calling vc.update_before_write_at_auto_file to produce the 
@auto-view tree.  I would have expected that to work for all nodes, but 
apparently it doesn't for at least some existing organizer nodes.

2. vc.move_nodes_to_organizers duplicates nodes in some situations.  You 
would think that doing what the "work list" (vc.global_moved_node_list) 
says would be straightforward, but it is turning out to be quite a puzzle.  
Fixing this somehow is today's first priority.

3. Both bugs were complicated by an embarrassing blunder: code in two 
helpers of vc.create_organizer_data were trying to delete elements of an 
list used to iterate a loop.  The proper pattern is:

    for item in aList[:]: # <-- [:] makes a copy of aList.
        << possibly delete item from aList >>

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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to