On Sun, Jan 29, 2012 at 5:43 PM, Edward K. Ream <[email protected]> wrote:

> I'm not sure whether adding time.time() to a hash will make things
> better or worse.  Let me think about what problem the hash is *really*
> attempting to solve.  That may suggest a way forward.

I have spent several pleasant hours researching the situation, mostly
using the clone-find-all command.

As expected, c.hash() is used *only* to create a "weak" link between a
commander C created during a the prepass of a local file and *another*
commander C2 created *later* during the second and final read of the
local file.

Happily, there is no need for a weak link: it is possible to create a
"strong" link to the existing commander (or c.config).  The code is
kludgy:  g.app.config.updateSettings can set
self.copied_local_options_dict, and the c.config ctor called later can
copy g.app.config.copied_local_options_dict into its own ivar.

Actually, things are a bit more complicated than that, because all the
methods are really g.app.config methods rather than c.config methods,
but the idea is the same.

In short, there is no need for c.hash: it is possible, though not
pretty, to remember the dicts created during the pre-load of a local
file until such time as the permanent c.config object is created.

I'll be committing the code tomorrow, after I clean it up and test it further.

Edward

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