add-editor traceback
alt-x add-editor when returning focus to lh window: ** isPython3: False Leo 4.11 final, build 20140903205542, Wed Sep 3 20:55:42 CDT 2014 Git repo info: branch = master, commit = 4a84122e672b Python 2.7.6, PyQt version 4.8.6 linux2 setting leoID from os.getenv('USER'): 'ktenney' reading settings in /var/fetching/leo-editor/leo/config/leoSettings.leo reading settings in /home/ktenney/develop/myLeoSettings.leo Using default leo file name: /home/ktenney/.leo/workbook.leo reading settings in /var/fetching/leo-editor/leo/doc/CheatSheet.leo wrote recent file: /home/ktenney/.leo/.leoRecentFiles.txt Traceback (most recent call last): File /var/fetching/leo-editor/leo/plugins/qtGui.py, line 7002, in eventFilter c.frame.body.onFocusIn(obj) File /var/fetching/leo-editor/leo/plugins/qtGui.py, line 2162, in onFocusIn self.selectEditor(wrapper) File /var/fetching/leo-editor/leo/plugins/qtGui.py, line 1905, in selectEditor val = self.selectEditorHelper(wrapper) File /var/fetching/leo-editor/leo/plugins/qtGui.py, line 1942, in selectEditorHelper c.redraw() File /var/fetching/leo-editor/leo/core/leoCommands.py, line 7439, in redraw p2 = c.frame.tree.redraw(p) File /var/fetching/leo-editor/leo/plugins/baseNativeTree.py, line 152, in full_redraw self.drawTopTree(p) File /var/fetching/leo-editor/leo/plugins/baseNativeTree.py, line 230, in drawTopTree self.drawTree(p) File /var/fetching/leo-editor/leo/plugins/baseNativeTree.py, line 242, in drawTree item = self.drawNode(p,parent_item) File /var/fetching/leo-editor/leo/plugins/baseNativeTree.py, line 199, in drawNode item = self.createTreeItem(p,parent_item) File /var/fetching/leo-editor/leo/plugins/qtGui.py, line 4940, in createTreeItem g.visit_tree_item(self.c, p, item) File /var/fetching/leo-editor/leo/core/leoPlugins.py, line 64, in __call__ ret = cmd(*args, **kw) File /var/fetching/leo-editor/leo/plugins/valuespace.py, line 205, in colorize_headlines_visitor if p.h.startswith(!= ): File /var/fetching/leo-editor/leo/core/leoNodes.py, line 350, in __get_h return p.headString() File /var/fetching/leo-editor/leo/core/leoNodes.py, line 436, in headString return self.v.headString() File /var/fetching/leo-editor/leo/core/leoNodes.py, line 2119, in headString if not g.isUnicode(self._headString): File /var/fetching/leo-editor/leo/core/leoGlobals.py, line 4872, in isUnicode return type(s) == types.UnicodeType RuntimeError: maximum recursion depth exceeded while calling a Python object -- 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.
The collapse in complexity is complete
This project appears to be a complete success. No further work is planned. I have encountered no problems at all during this reorg, and don't expect any, but we shall see... Here are the highlights: 1. *All* of the odious redirection code in Leo is gone. The redirection code appeared in various places, especially in the HighLevelInterface class. 2. The HighLevelInterface class is gone: the LeoBody and LeoLog classes are now subclasses of object. 3. The logCtrl property is gone: the LeoLog class now defines a .logCtrl ivar. This ivar is inherently tricky: depending on which log *tab* is selected, LeoLog.logCtrl may be either a wrapper or a widget! Because LeoLog no longer contains redirection code a hack was needed. k.masterKeyHandler redirects text-related events originally sent to the c.frame.log to c.frame.log.logWidget, which, confusingly enough, is actually a text wrapper. 4. leoFrame.py contains several new API classes: ColorizerAPI, IconBarAPI, StatusLineAPI and WrapperAPI. No class is a subclass of these classes: they are for unit testing only. The new unit test, @test interfaces using API classes, checks that classes implement all the methods in the corresponding API class. This is not a perfect solution and it is no substitute for pylint. Nevertheless, these API classes are good documentation, and they did result in a few new methods being added to each tested Null class. That's all! You may not believe it, but I think of all this work as being related to fixing bugs. I'll now return more directly to bug fixes. 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: add-editor traceback
On Thu, Sep 4, 2014 at 6:22 AM, Kent Tenney kten...@gmail.com wrote: alt-x add-editor when returning focus to lh window: Thanks Kent, I'll fix this immediately. 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: add-editor traceback
On Thu, Sep 4, 2014 at 6:46 AM, Edward K. Ream edream...@gmail.com wrote: On Thu, Sep 4, 2014 at 6:22 AM, Kent Tenney kten...@gmail.com wrote: alt-x add-editor when returning focus to lh window: Thanks Kent, I'll fix this immediately. The bug was introduced at rev 665bf93 on 3 Sept. 13:16. Alas, this was an extremely important change. Here is part of the checkin log: QQQ LeoBody class no longer is a subclass of HighLevelInterface... Removed the bodyCtrl property... QQQ For now, I suggest you use the previous rev: d7d577a 3 Sept. 9:56. Naturally, I am not going to give up two days work without a fight :-) I am investigating how to revert the main line so that people checking it out will get rev d7d577a 3 Sept. 9:56. 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: add-editor traceback
np I may be somewhat an edge case in my use of add-editor, it's a great feature, but I can manage without it for the time being. On Thu, Sep 4, 2014 at 8:00 AM, Edward K. Ream edream...@gmail.com wrote: On Thu, Sep 4, 2014 at 6:46 AM, Edward K. Ream edream...@gmail.com wrote: On Thu, Sep 4, 2014 at 6:22 AM, Kent Tenney kten...@gmail.com wrote: alt-x add-editor when returning focus to lh window: Thanks Kent, I'll fix this immediately. The bug was introduced at rev 665bf93 on 3 Sept. 13:16. Alas, this was an extremely important change. Here is part of the checkin log: QQQ LeoBody class no longer is a subclass of HighLevelInterface... Removed the bodyCtrl property... QQQ For now, I suggest you use the previous rev: d7d577a 3 Sept. 9:56. Naturally, I am not going to give up two days work without a fight :-) I am investigating how to revert the main line so that people checking it out will get rev d7d577a 3 Sept. 9:56. 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.
Recursive import fails on windows back up files
I'm using the wonderful file import code as found in scripts to import all my Latex files into nodes. This works brilliantly but fails on reaching Word backup files (file names prefixed with a ~) This is not a massive problem but I thought that the importer would ignore any file that didn't have a .tex extension? ta IH Traceback (most recent call last): File C:\Program Files (x86)\Leo_410\leo\core\leoImport.py, line 2005, in run self.import_dir(root.copy(),dir_) File C:\Program Files (x86)\Leo_410\leo\core\leoImport.py, line 1675, in import_dir self.import_dir(child,dir_) File C:\Program Files (x86)\Leo_410\leo\core\leoImport.py, line 1675, in import_dir self.import_dir(child,dir_) File C:\Program Files (x86)\Leo_410\leo\core\leoImport.py, line 1646, in import_dir dirs,files,files2 = [],os.listdir(dir_),[] WindowsError: [Error 3] The system cannot find the path specified: u'C:\\$ck_14_11_10_1Sam_25.docx\\*.*' '''Recursively import all python files in a directory and clean the result.''' # Latest change: use c.recursiveImport. c.recursiveImport( dir_ = r'F:\Words\TexFiles', one_file = False, safe_at_file = False, theTypes = ['.tex'], # Same as ['.py'] use_at_edit = False) -- 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: Recursive import fails on windows back up files
On Thu, Sep 4, 2014 at 8:37 AM, Israel Hands alist...@mcgh.ee wrote: I'm using the wonderful file import code as found in scripts to import all my Latex files into nodes. This works brilliantly but fails on reaching Word backup files (file names prefixed with a ~) This is not a massive problem but I thought that the importer would ignore any file that didn't have a .tex extension? Thanks for this report. The best way to keep my attention on this will be to file a bug report here: https://github.com/leo-editor/leo-editor/issues 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: add-editor traceback
On Thu, Sep 4, 2014 at 8:06 AM, Kent Tenney kten...@gmail.com wrote: np I may be somewhat an edge case in my use of add-editor, it's a great feature, but I can manage without it for the time being. It's not you. The code is hosed. It may be one line that got transliterated incorrectly in the reorg. I plan to fix it today. Knowing the commit that caused the problem helps :-) EKR -- 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.
API change?
A button of mine checks for selected body text, what is the current equivalent of: c.frame.body.hasSelection() which causes a traceback, presumably the following has also changed: c.frame.body.getSelectedText() Thanks, Kent -- 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: API change?
On Thu, Sep 4, 2014 at 11:11 AM, Kent Tenney kten...@gmail.com wrote: A button of mine checks for selected body text, what is the current equivalent of: c.frame.body.hasSelection() which causes a traceback, presumably the following has also changed: c.frame.body.getSelectedText() Change c.frame.body to c.frame.body.wrapper everywhere. Although more verbose, it makes more sense: c.frame.body is not, and never has been, a text widget/wrapper/whatever. It's more of a controller. Sorry to break code, but I think had to be done. 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: add-editor traceback
On Thu, Sep 4, 2014 at 10:08 AM, Edward K. Ream edream...@gmail.com wrote: It's not you. The code is hosed. It may be one line that got transliterated incorrectly in the reorg. That's exactly what happened. A recent rev fixed that bug, and another rev makes add-editor work with the Scintilla widget. That took some doing, none of it related to add-editor code itself. All of Leo's code now uses g.isTextWidget and g.isTextWrapper, rather than doing direct calls to isinstance. Much better hiding of knowledge. In addition, the colorizer had to be disabled when using Scintilla. It's not needed, and Scintilla uses a different flavor of document than QTextEdit. Sheesh. Edward P.S. Imo, it was a good thing to commit directly to master. That way you found the bug more quickly ;-) EKR -- 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: API change?
are there more such things to be changed on the scripts? I was using c.frame.body a lot. On Thu, Sep 4, 2014 at 7:37 PM, Edward K. Ream edream...@gmail.com wrote: On Thu, Sep 4, 2014 at 11:11 AM, Kent Tenney kten...@gmail.com wrote: A button of mine checks for selected body text, what is the current equivalent of: c.frame.body.hasSelection() which causes a traceback, presumably the following has also changed: c.frame.body.getSelectedText() Change c.frame.body to c.frame.body.wrapper everywhere. Although more verbose, it makes more sense: c.frame.body is not, and never has been, a text widget/wrapper/whatever. It's more of a controller. Sorry to break code, but I think had to be done. 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: API change?
On Thu, Sep 4, 2014 at 12:54 PM, Fidel N fidelpe...@gmail.com wrote: are there more such things to be changed on the scripts? I was using c.frame.body a lot. body - body.wrapper is the main one. logCtrl remains, so no change re the log. Off hand, I can't think of any others. Certainly no changes to tree methods. Let me know if you find any ;-) 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: API change?
hehe I will. Thanks for the confirmation. On Thu, Sep 4, 2014 at 8:17 PM, Edward K. Ream edream...@gmail.com wrote: On Thu, Sep 4, 2014 at 12:54 PM, Fidel N fidelpe...@gmail.com wrote: are there more such things to be changed on the scripts? I was using c.frame.body a lot. body - body.wrapper is the main one. logCtrl remains, so no change re the log. Off hand, I can't think of any others. Certainly no changes to tree methods. Let me know if you find any ;-) 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.