Re: Autocomplete
On Sat, Mar 10, 2018 at 9:06 AM, Arjanwrote: I happened upon Python auto-completion somewhere in the docs (nice > feature!). Upon first trying it, I got an exception: > This uncovered a can of worms ;-) Rev 6d95fe6 makes many changes to leo/external/codewise.py. How does this work for you? I don't use this and haven't tested the changes. 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 https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Autocomplete
I happened upon Python auto-completion somewhere in the docs (nice feature!). Upon first trying it, I got an exception: autocompleter On Traceback (most recent call last): File "/home/username/bin/leo-editor/leo/external/codewise.py", line 563, in cursor return self.dbconn.cursor() sqlite3.ProgrammingError: Cannot operate on a closed database. During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/username/bin/leo-editor/leo/core/leoGlobals.py", line 2471, in new_cmd_wrapper func(self, event=event) File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 218, in autoComplete self.start(event) File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 955, in start self.init_qcompleter(event) File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 813, in init_qcompleter options = self.get_completions(prefix) File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 586, in get_completions aList = self.get_codewise_completions('self.') File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 630, in get_codewise_completions hits = self.lookup_functions(func) File "/home/username/bin/leo-editor/leo/core/leoKeys.py", line 695, in lookup_functions aList = codewise.cmd_functions([prefix]) File "/home/username/bin/leo-editor/leo/external/codewise.py", line 173, in cmd_functions funcs = cw.get_functions(args[0]) File "/home/username/bin/leo-editor/leo/external/codewise.py", line 596, in get_functions c = self.cursor() File "/home/username/bin/leo-editor/leo/external/codewise.py", line 565, in cursor g.es("No cursor for codewise DB, closed database?") AttributeError: module 'leo.external.codewise' has no attribute 'es' The completions did work, and strangely, upon restarting Leo and enabling autocomplete again I no longer see this error. But I thought I'd mention it in case it does indicate a problem somewhere. Another minor issue: the autocomplete dialog appears two lines below the point where it's invoked. I'm using Leo 5.8 devel, build 20180227113208 Git repo info: branch = master, commit = 2c288fb7c15b Python 3.6.3, PyQt version 5.6.2, with the default theme. Cheers, Arjan -- 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 https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
Re: autocomplete: is it complete?
On Sun, Oct 27, 2013 at 8:26 PM, wgw wgwin...@gmail.com wrote: In the docs it says: When a single completion is shown, typing ‘?’ will show the docstring for a method. For example: c.atFileCommands.write? shows: Write a 4.x derived file. root is the position of an @file node Does this work for anyone? (Very useful!) It works for me, but only in special cases. The reason the *exact* example above works is that: a) c.atFileCommands.write is *already* a valid completion and b) c.atFileCommands.write is *also* a prefix of other at.FileCommands methods. In that case, auto_completer_state_handler is still active, and the '?' characters works. Obviously, there are many other situations where you have typed a unique method name, which causes auto_completer_state_handler to exit. In those more common cases, the '?' character won't work. There is no quick fix for this. Probably a new command is needed. Please file a bug report. Thanks. 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/groups/opt_out.
Re: autocomplete: is it complete?
Thanks Edward, I will put this in a bug report (in fact, the exact example does not work for me -- maybe a ubuntu thing). I do think autocomplete is a crucial feature. Leo has such an enormous array of good code (and example code) that it is a shame to hide it. In fact, the ability to quickly get at what has been done in any project, all the way down to code that says x=1, is what allows a project to move forward. Object oriented programming probably owes much of its success to pure consultability. Autocomplete is part of that paradigm. Bill Le lundi 28 octobre 2013 06:04:52 UTC-7, Edward K. Ream a écrit : On Sun, Oct 27, 2013 at 8:26 PM, wgw wgwi...@gmail.com javascript:wrote: In the docs it says: When a single completion is shown, typing ‘?’ will show the docstring for a method. For example: c.atFileCommands.write? shows: Write a 4.x derived file. root is the position of an @file node Does this work for anyone? (Very useful!) It works for me, but only in special cases. The reason the *exact* example above works is that: a) c.atFileCommands.write is *already* a valid completion and b) c.atFileCommands.write is *also* a prefix of other at.FileCommands methods. In that case, auto_completer_state_handler is still active, and the '?' characters works. Obviously, there are many other situations where you have typed a unique method name, which causes auto_completer_state_handler to exit. In those more common cases, the '?' character won't work. There is no quick fix for this. Probably a new command is needed. Please file a bug report. Thanks. 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/groups/opt_out.
Re: autocomplete: is it complete?
One last thought about this: most projects that are Leo's size have api docs. I'm thinking of something like what you will find here: http://pyjs.org/api/ or, of course, here http://www.gwtproject.org/javadoc/latest/index.html Really, what will make Leo popular is getting more programmers involved. But convenient api documentation is a must for that to happen! Bill -- 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/groups/opt_out.
Re: autocomplete: is it complete?
On 10/28/2013 3:29 PM, wgw wrote: One last thought about this: most projects that are Leo's size have api docs. I'm thinking of something like what you will find here: http://pyjs.org/api/ or, of course, here http://www.gwtproject.org/javadoc/latest/index.html Really, what will make Leo popular is getting more programmers involved. But convenient api documentation is a must for that to happen! Bill They're a recent addition, but they're up at http://leo-editor.readthedocs.org/, and they're updated nightly (3am EST, I think). They are broken in some places, but that can't be helped when using readthedocs' infrastructure. PyQt4 does NOT play with their sphinx environment very well. --Jake -- 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/groups/opt_out.
Re: autocomplete: is it complete?
Brilliant! A great step forward for anyone who wants to understand the code base and contribute. I will put in a feature request: 1) fix the qt dimension of readthedocs, 2) index leo on nullege (http://nullege.com) -- it indexes every string in the project-- and finally, one day, 3) do all that is done with readTheDocs and nullege in Leo! Ouf! I don't think the nullege search engine works, but you can do a Google search on any string in the nullege site: site:nullege.com areaslider in Google will find the AreaSlider pyjs class. But actually, you can find any piece of code you want and see the code tree and source. This is very useful to see how a given function is being used everywhere in the code base. Thanks for the readTheDocs link. Bill Le lundi 28 octobre 2013 12:37:15 UTC-7, Jacob Peck a écrit : On 10/28/2013 3:29 PM, wgw wrote: One last thought about this: most projects that are Leo's size have api docs. I'm thinking of something like what you will find here: http://pyjs.org/api/ or, of course, here http://www.gwtproject.org/javadoc/latest/index.html Really, what will make Leo popular is getting more programmers involved. But convenient api documentation is a must for that to happen! Bill They're a recent addition, but they're up at http://leo-editor.readthedocs.org/, and they're updated nightly (3am EST, I think). They are broken in some places, but that can't be helped when using readthedocs' infrastructure. PyQt4 does NOT play with their sphinx environment very well. --Jake -- 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/groups/opt_out.
Re: autocomplete: is it complete?
I spoke too soon: I see that readthedocs does everything nullege does. So nullege is unnecessary Le lundi 28 octobre 2013 13:11:47 UTC-7, wgw a écrit : Brilliant! A great step forward for anyone who wants to understand the code base and contribute. I will put in a feature request: 1) fix the qt dimension of readthedocs, 2) index leo on nullege (http://nullege.com) -- it indexes every string in the project-- and finally, one day, 3) do all that is done with readTheDocs and nullege in Leo! Ouf! I don't think the nullege search engine works, but you can do a Google search on any string in the nullege site: site:nullege.com areaslider in Google will find the AreaSlider pyjs class. But actually, you can find any piece of code you want and see the code tree and source. This is very useful to see how a given function is being used everywhere in the code base. Thanks for the readTheDocs link. Bill Le lundi 28 octobre 2013 12:37:15 UTC-7, Jacob Peck a écrit : On 10/28/2013 3:29 PM, wgw wrote: One last thought about this: most projects that are Leo's size have api docs. I'm thinking of something like what you will find here: http://pyjs.org/api/ or, of course, here http://www.gwtproject.org/javadoc/latest/index.html Really, what will make Leo popular is getting more programmers involved. But convenient api documentation is a must for that to happen! Bill They're a recent addition, but they're up at http://leo-editor.readthedocs.org/, and they're updated nightly (3am EST, I think). They are broken in some places, but that can't be helped when using readthedocs' infrastructure. PyQt4 does NOT play with their sphinx environment very well. --Jake -- 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/groups/opt_out.
Re: autocomplete: is it complete?
On 10/28/2013 4:11 PM, wgw wrote: Brilliant! A great step forward for anyone who wants to understand the code base and contribute. I will put in a feature request: 1) fix the qt dimension of readthedocs, 2) index leo on nullege (http://nullege.com http://nullege.com/) -- it indexes every string in the project-- and finally, one day, 3) do all that is done with readTheDocs and nullege in Leo! Ouf! I don't think the nullege search engine works, but you can do a Google search on any string in the nullege site: site:nullege.com areaslider in Google will find the AreaSlider pyjs class. But actually, you can find any piece of code you want and see the code tree and source. This is very useful to see how a given function is being used everywhere in the code base. Thanks for the readTheDocs link. Bill I've submitted the nightly github mirror (http://github.com/leo-editor/leo-editor) of Leo to Nullege for crawling. I couldn't submit the launchpad repo because nullege doesn't support bzr. Whether it's needed or not, increased exposure is a good thing! --Jake Le lundi 28 octobre 2013 12:37:15 UTC-7, Jacob Peck a écrit : On 10/28/2013 3:29 PM, wgw wrote: One last thought about this: most projects that are Leo's size have api docs. I'm thinking of something like what you will find here: http://pyjs.org/api/ or, of course, here http://www.gwtproject.org/javadoc/latest/index.html http://www.gwtproject.org/javadoc/latest/index.html Really, what will make Leo popular is getting more programmers involved. But convenient api documentation is a must for that to happen! Bill They're a recent addition, but they're up at http://leo-editor.readthedocs.org/ http://leo-editor.readthedocs.org/, and they're updated nightly (3am EST, I think). They are broken in some places, but that can't be helped when using readthedocs' infrastructure. PyQt4 does NOT play with their sphinx environment very well. --Jake -- 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/groups/opt_out. -- 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/groups/opt_out.
autocomplete: is it complete?
In the docs it says: When a single completion is shown, typing ‘?’ will show the docstring for a method. For example: c.atFileCommands.write? shows: Write a 4.x derived file. root is the position of an @file node Does this work for anyone? (Very useful!) For me, I get nothing, but autocomplete does complete after the dot. Workaround: g.es(c.atFileCommands.write.__doc__) -- 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/groups/opt_out.
Re: autocomplete docs out of place?
On Mon, May 3, 2010 at 11:19 PM, Matt Wilkie map...@gmail.com wrote: The doc section on Outlines[1] starts off talking about autocompletion and calltips , which I think is out of place. I agree. I think it belongs in Chapter 5: Using Leo's commandes. The same section contains sub headings which are not bolded or otherwise marked to stand out from the text proper. Both of these have been fixed at rev 3070. I'll update the users guide online soon. Edward -- You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-edi...@googlegroups.com. To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
autocomplete docs out of place?
The doc section on Outlines[1] starts off talking about autocompletion and calltips , which I think is out of place. The same section contains sub headings which are not bolded or otherwise marked to stand out from the text proper. Wherever it finally lives, the autocomplete section should mention that it needs to be turned on first with [Alt-1] and that the results are displayed in the log pane; might help alleviate some confusion. :) [1] http://webpages.charter.net/edreamleo/outlines.html -- -matt -- You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-edi...@googlegroups.com. To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
Re: Using codewise (autocomplete) with Tk
On Thu, Dec 17, 2009 at 8:29 AM, Ville M. Vainio vivai...@gmail.com wrote: The version of codewise completer that works with Tk is now on trunk. It implements command codewise-suggest that prints the possible compeltions to log with g.es(). As such, it won't save you any typing, but it can help refresh your memory about available commands. Apart from that, the previous instructions for codewise still apply. If you actually want to save typing, some extra work needs to be done (by someone that actually uses the Tk ui and/or knows Tk). Thanks for this. I've put this on my to-do list. No idea when I'll get around to it. Edward -- You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-edi...@googlegroups.com. To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
Re: autocomplete broken when using ipython bridge?
I have not seen your problems, but I've been playing with ILeo and have run into completion problems in IPython. These where fixed when I upgraded my pyreadline distribution. Tom --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---
autocomplete broken when using ipython bridge?
autocomplete works just fine when using it without ipython but with is says that it cannot find a module called revision.knit is this known?! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups leo-editor group. To post to this group, send email to leo-editor@googlegroups.com To unsubscribe from this group, send email to leo-editor+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~--~~~~--~~--~--~---