On Saturday, January 11, 2014 7:13:59 AM UTC-6, Edward K. Ream wrote: > Before doing @existing-organizer: there are a few loose ends to complete:
1. Nested and intermediate organizer nodes must be handled correctly before doing anything else. I've refactored vc.switch_active_organizer to make handling the details easier, but tricky work remains. 2. The read init code must be refactored to eliminate redundant computations. While I am at it, I'll rename some vars that have turned out to be surprisingly irritating and/or confusing. 3. There are several problems with testing: - Several unit tests don't properly compare "before" and "after" outlines. - The perfect import check in vc.check is a no-op. It must be rewritten. - There should be a method that reports errors when the perfect import check fails. It should suffice to report the first node that will cause the perfect import check to fail. In fact, a trail write of an @auto outline could probably be just the concatenation of the body text of all nodes, in outline order. I'll have to double-check this assertion. 4. The write code should warn the user if headlines have changed since the @auto node was read. Changing headlines will usually break organizer nodes and clone links. One could try to eliminate the warning if a) the body text has changed and b) the changed headline will match what the importer will create for (the new body text of ) that node the *next* time the @auto node is read. But for now, a warning is plenty good enough. > When these are complete it will be time to support existing organizers. The vc.write code should *not* create @existing-organizer nodes for nodes whose children are created by the importer! That would, *at best*, be redundant. Therefore, the read init code will create a dict of positions p that have children on entry. The keys will be p.v, so that the dict remains valid when nodes have been moved. The write code will create @existing-organizer: nodes only for nodes (which children) that are *not* in the dict. Handling nested and intermediate organizer nodes is the crucial part of the puzzle. Everything else seems straightforward. 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.
