On Wednesday, December 11, 2013 12:02:24 PM UTC-6, Edward K. Ream wrote: But suppose we simply say that the identity of each node in an @auto tree > is its headline? This might work! > > 1. The headline is quite an excellent proxy for true identity. It will > change much less often than body text. Indeed, you could say that changing > the name of a class, method or function does *in fact* change the objects > identity! > > 2. It will be rare, in practice, for two nodes (in an @auto node) to have > the same headline. > > True, if Nancy changes the name of a class, method or function, clone > links will break when Leo reads the file. But broken clone links will > *always* be a possibility--this scheme seems like the least bad option. >
I should have said that clone links *would* break if there were any ;-) At present, the @auto logic makes no attempt to link imported nodes with possibly-previously-cloned nodes. More importantly, attempting to recreate clone links based on *anything* other than actual gnx's (which presumably do not exist in the imported file) might be dangerous. Erroneously adding a clone link to the wrong node might corrupt data. I'm not sure of this last statement, but I am sure that at least one theorem must be stated and proved before I will be confident that recreating clone links can be done safely. The (experimental) way forward would be to add a post-pass that would attempt to link nodes in the Leo outline (.leo file or other external files) with node in the newly-read @auto node. This would be a matching process: something like a dict of headlines in the @auto file compared to a dict of headlines in the entire outline. A likely shortcut: If an @auto node appears in the cache, it might be able to guess the gnx's of all the nodes in that file. Other tricks are conceivable. Summary 1. Recreating clone links into @auto files does not exist yet. 2. Recreating such links might corrupt data. I will attempt to put this process on a solid theoretical footing. 3. Recreating clone links should be possible. Given the importance of this project, a lot of work could be justified. 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.
