Re: Weird autocompleter bug
The autocompleter works normally for me now. Thanks Edward. On Sat, Aug 9, 2014 at 11:00 PM, Edward K. Ream wrote: > On Sat, Aug 9, 2014 at 11:19 AM, Edward K. Ream > wrote: > > > So the mystery of my rollback of leoAtFile.py didn't solve the problem > > is completely explained. Still, some care will be required. I'll fix > this later today... > > Fixed. Maybe. Here is the checkin log for rev 90a0531... > > QQQ > Revert to old code that imports plugins/writers and plugins/importers > using importlib.import_module. > This causes autocompleters for c.whatever to work. > All tests pass, pylint is happy, and the writers and importers appear > to work, but I have the feeling I am missing something... > QQQ > > I should have said also that docutils appears to work. So I have > tried every test that comes to mind, but I have the feeling there > could be problems. After all, there may have been a reason for the > change to the code. Heh, heh. > > Otoh, as part of the new commit, I improved the tests for duplicate > classes: no warning is given if the old and new entries in > ic.atAutoDict are the same. This is expected because Leo reads some > .leo files twice. Maybe what happened is that I was overly worried > about the messages and went to too-extreme lengths to avoid them. > > In short, the new code is an experiment. Please report your > experience, for good or ill... > > 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 leo-editor+unsubscr...@googlegroups.com. > To post to this group, send email to leo-editor@googlegroups.com. > Visit this group at http://groups.google.com/group/leo-editor. > For more options, visit https://groups.google.com/d/optout. > -- 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Weird autocompleter bug
On Sat, Aug 9, 2014 at 11:19 AM, Edward K. Ream wrote: > So the mystery of my rollback of leoAtFile.py didn't solve the problem > is completely explained. Still, some care will be required. I'll fix this > later today... Fixed. Maybe. Here is the checkin log for rev 90a0531... QQQ Revert to old code that imports plugins/writers and plugins/importers using importlib.import_module. This causes autocompleters for c.whatever to work. All tests pass, pylint is happy, and the writers and importers appear to work, but I have the feeling I am missing something... QQQ I should have said also that docutils appears to work. So I have tried every test that comes to mind, but I have the feeling there could be problems. After all, there may have been a reason for the change to the code. Heh, heh. Otoh, as part of the new commit, I improved the tests for duplicate classes: no warning is given if the old and new entries in ic.atAutoDict are the same. This is expected because Leo reads some .leo files twice. Maybe what happened is that I was overly worried about the messages and went to too-extreme lengths to avoid them. In short, the new code is an experiment. Please report your experience, for good or ill... 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Weird autocompleter bug
On Sat, Aug 9, 2014 at 11:10 AM, Edward K. Ream wrote: Ach. I see why the git bisect was so dashed confusing. The commit that caused the problems changed *two* files, leoAtFile.py and leoImport.py. Somehow, I didn't see the change to leoImport.py, but now, from first principles, it's clear that it was the change to ic.createImporterData that caused the problem, *not* the change to at.createWritersData. So the mystery of my rollback of leoAtFile.py didn't solve the problem is completely explained. Still, some care will be required. I'll fix this later today... 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Weird autocompleter bug
On Sat, Aug 9, 2014 at 8:24 AM, Edward K. Ream wrote: > I'll attempt a fix today. I inserted a trace in AutoCompleterClass.get_leo_namespace:: def get_leo_namespace (self,prefix): ''' Return an environment in which to evaluate prefix. Add some common standard library modules as needed. ''' trace = True and not g.unitTesting k = self.k d = {'c':k.c, 'p':k.c.p, 'g':g} aList = prefix.split('.') if len(aList) > 1: name = aList[0] m = sys.modules.get(name) if m: d[name]= m if trace: g.trace('prefix',prefix,'aList',aList) for key in sorted(d.keys()): g.trace(key,d.get(key)) return Here is what it reported (minus the leading method name):: prefix c. aList [u'c', u''] c g p So now it's clear what is happening: the module defined in leo/plugins/importers/c.py is polluting the global namespace. That is, it is entered into sys.modules as "c" rather than "leo.plugins.importers.c". You would think it would be easy to change that, but as I recall there is a problem with rst.py. It, at least, must be entered "bare", or docutils will barf. Big sigh. I think Leo must special case rst.py. Btw, there is already a special case for docutils, the importer is leo.plugins.importers.leo_rst. I'll have to think about this... Edward -- Edward K. Ream: edream...@gmail.com Leo: http://leoeditor.com/ Speak the truth, but not to punish--Thich Nhat Hanh -- -- 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Weird autocompleter bug
On Fri, Aug 8, 2014 at 10:00 AM, Fidel N wrote: > well ill wait till "c." completes well then try to find out the difference, > but I really trust when the other thing is fixed this also will. I'll attempt a fix today. 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: Aha: vim trainer mode
Sorry again, but the shortcutfoo website also asks for money when you reach certain level :( Seems like best solution right now is vim-trainer mode :D -- 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at http://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.