Hi!
I wonder, if it is possible to provide better suggestions for Python. Right now only the name of a function is provided. Is it possible, to provide also names of args?
Or maybe you could point me the code, where it is made. I doubt, if I manage to change, but maybe it's simple enough to try it ;-)
On Mon, 29 Jun 2009 11:55:49 +0200, Filip wrote:
Hey Filip,
I wonder, if it is possible to provide better suggestions for Python. Right now only the name of a function is provided. Is it possible, to provide also names of args?
we are talking about the standard Python functions, not those you have defined in your open files, right?
Or maybe you could point me the code, where it is made. I doubt, if I manage to change, but maybe it's simple enough to try it ;-)
If the above is true, have a look at scripts/create_py_tags.py in the Geany source directory. This script is used to generate the python tags file of the standard functions. And this surely can be improved heavily and since you know Python, it maybe isn't too hard. Any improvements are welcome.
Regards, Enrico
we are talking about the standard Python functions, not those you have defined in your open files, right?
Those defined in the open files. You must read those files and create tags already, so it should be pretty simple to change them into the whole signature (possibly as a pref). This would be cool, because if you use good arg naming, you know, what you have to pass. And that _really_ improves productivity.
If the above is true, have a look at scripts/create_py_tags.py in the Geany source directory. This script is used to generate the python tags file of the standard functions. And this surely can be improved heavily and since you know Python, it maybe isn't too hard. Any improvements are welcome.
I'll take a look, but since I know neither gtk, nor scintilla, I doubt if this is very fruitful.
Am 29.06.2009 22:33, schrieb Filip Gruszczyński:
I'll take a look, but since I know neither gtk, nor scintilla, I doubt if this is very fruitful.
You don't have to know scintilla or gtk, all you have to do is extending the python tag creation script so that it puts out function parameters additionally to their names.
You could use the `inspect` module for this. Alternatively, you could refer to bpython's source[1].
But another thing: There are many functions from different modules with the same name. Unfortunately Geany can't manage object orientation or namespaces (regarding that autocompletion feature). Typing "foobar" (trying to access "mysuperclass.foobar()") I get suggestions to use some "foobar()" function that has nothing to do with the foobar method I tried to access. I think this should be improved :)
Regards, Jonas
On Mon, 29 Jun 2009 22:33:46 +0200, Filip wrote:
we are talking about the standard Python functions, not those you have defined in your open files, right?
Those defined in the open files. You must read those files and create tags already, so it should be pretty simple to change them into the whole signature (possibly as a pref). This would be cool, because if you use good arg naming, you know, what you have to pass. And that _really_ improves productivity.
Er, for open files Geany should detect the argument lists of functions and also show them when calltips are requested (by typing a '(' after the function name or by pressing Ctrl-Shift-Space). At least with the SVN version this should work, not sure about the latest release.
If the above is true, have a look at scripts/create_py_tags.py in the Geany source directory. This script is used to generate the python tags file of the standard functions. And this surely can be improved heavily and since you know Python, it maybe isn't too hard. Any improvements are welcome.
I'll take a look, but since I know neither gtk, nor scintilla, I doubt if this is very fruitful.
See Jonas' mail.
Regards, Enrico
Er, for open files Geany should detect the argument lists of functions and also show them when calltips are requested (by typing a '(' after the function name or by pressing Ctrl-Shift-Space). At least with the SVN version this should work, not sure about the latest release.
God dammit, indeed it is!! And it tells the class, in which it was found! But I haven't found Ctrl+Shift+Space command in manual. And I didn't know, that I could use it, since I am so much used to Ctrl+Space!
Ok, just one more thing and you are officially the best tool for Python development ever: how can toggle those tags? I mean, there are arrows and I can click and they are toggled. But I need to have it from the keyboard, because moving hand from the keyboard to the mouse just won't work.
On Tue, 30 Jun 2009 00:19:35 +0200, Filip wrote:
Er, for open files Geany should detect the argument lists of functions and also show them when calltips are requested (by typing a '(' after the function name or by pressing Ctrl-Shift-Space). At least with the SVN version this should work, not sure about the latest release.
God dammit, indeed it is!! And it tells the class, in which it was found! But I haven't found Ctrl+Shift+Space command in manual. And I
Indeed. The documentation said Alt-Space for Unix and Alt-Shift-Space for Windows which are both wrong. For both systems the default is Ctrl-Shift-Space. I updated the docs, thanks for reporting.
Ok, just one more thing and you are officially the best tool for Python development ever: how can toggle those tags? I mean, there are arrows and I can click and they are toggled. But I need to have it from the keyboard, because moving hand from the keyboard to the mouse just won't work.
It seems this isn't possible. At least the Scintilla documentation (the calltip window with the arrows is drawn by Scintilla, Geany only requests it and fill it with data) only talks about clicking the arrows with the mouse, it seems it isn't possible to use the keyboard for that. Or I'm missing something.
Regards, Enrico
Indeed. The documentation said Alt-Space for Unix and Alt-Shift-Space for Windows which are both wrong. For both systems the default is Ctrl-Shift-Space. I updated the docs, thanks for reporting.
Glad I could help :-)
It seems this isn't possible. At least the Scintilla documentation (the calltip window with the arrows is drawn by Scintilla, Geany only requests it and fill it with data) only talks about clicking the arrows with the mouse, it seems it isn't possible to use the keyboard for that. Or I'm missing something.
I have taken a look at Scintilla docs and it seems you are right. God dammit!
But I assume, that you are depending on SCN_CALLTIPCLICK, to change the content of the calltip right? So you have to access somehow the calltip content. Can't you just assign some keys in Geany and call the same function? Or are you filling the content of the calltip first and only then everything is done by the Scintilla?
On Tue, 30 Jun 2009 22:37:28 +0200, Filip wrote:
It seems this isn't possible. At least the Scintilla documentation (the calltip window with the arrows is drawn by Scintilla, Geany only requests it and fill it with data) only talks about clicking the arrows with the mouse, it seems it isn't possible to use the keyboard for that. Or I'm missing something.
I have taken a look at Scintilla docs and it seems you are right. God dammit!
But I assume, that you are depending on SCN_CALLTIPCLICK, to change the content of the calltip right? So you have to access somehow the calltip content. Can't you just assign some keys in Geany and call the same function? Or are you filling the content of the calltip first and only then everything is done by the Scintilla?
Right. We say to Scintilla what text should be displayed in the calltip window and then we say it should be shown. But we can't get any reference to it once it is displayed. Filing a feature request to Scintilla to add some keybindings for this would be a good idea.
Regards, Enrico
Am 30.06.2009 22:47, schrieb Enrico Tröger:
Filing a feature request to Scintilla to add some keybindings for this would be a good idea.
Until then you could hardcode that keybinding (just add some shortcut key to the tooltip).
If you have access to the calltip from outside of itself you could simply add another access key to the keymap and write a function managing this. (I'm afraid reading the code tells me you cannot access calltips from outside.)
Regards, Jonas
On Tue, 30 Jun 2009 22:58:45 +0200, Jonas wrote:
Am 30.06.2009 22:47, schrieb Enrico Tröger:
Filing a feature request to Scintilla to add some keybindings for this would be a good idea.
Until then you could hardcode that keybinding (just add some shortcut key to the tooltip).
If you have access to the calltip from outside of itself you could simply add another access key to the keymap and write a function managing this. (I'm afraid reading the code tells me you cannot access calltips from outside.)
I just said that in my last mail. At least I don't think it's possible but I must admit I also didn't have a close look at it.
I still think the first step should be to request this in Scintilla before thinking about crappy hacks :).
Regards, Enrico
Am 30.06.2009 23:15, schrieb Enrico Tröger:
I just said that in my last mail. At least I don't think it's possible but I must admit I also didn't have a close look at it.
Exactly for this reason I told him that there *may* be a chance ;)
I still think the first step should be to request this in Scintilla before thinking about crappy hacks :).
+1 ;-)
The obvious hack would bind some keys and create a new list, that would be passed to the calltip and displayed again. But that's so hideous, that I will certainly report a feature request to Scintilla.
2009/6/30 Jonas Haag jonas@jonashaag.de:
Am 30.06.2009 23:15, schrieb Enrico Tröger:
I just said that in my last mail. At least I don't think it's possible but I must admit I also didn't have a close look at it.
Exactly for this reason I told him that there *may* be a chance ;)
I still think the first step should be to request this in Scintilla before thinking about crappy hacks :).
+1 ;-) _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
http://sourceforge.net/tracker/index.php?func=detail&aid=982384&grou...
It seems, we are hardly the first people to notice this, but strangely the request was rejected. Any idea what can be done next?
2009/7/1 Filip Gruszczyński gruszczy@gmail.com:
The obvious hack would bind some keys and create a new list, that would be passed to the calltip and displayed again. But that's so hideous, that I will certainly report a feature request to Scintilla.
2009/6/30 Jonas Haag jonas@jonashaag.de:
Am 30.06.2009 23:15, schrieb Enrico Tröger:
I just said that in my last mail. At least I don't think it's possible but I must admit I also didn't have a close look at it.
Exactly for this reason I told him that there *may* be a chance ;)
I still think the first step should be to request this in Scintilla before thinking about crappy hacks :).
+1 ;-) _______________________________________________ Geany mailing list Geany@uvena.de http://lists.uvena.de/cgi-bin/mailman/listinfo/geany
-- Filip Gruszczyński
On Thu, 2 Jul 2009 16:07:42 +0200, Filip wrote:
http://sourceforge.net/tracker/index.php?func=detail&aid=982384&grou...
It seems, we are hardly the first people to notice this, but strangely the request was rejected. Any idea what can be done next?
What Neil said: someone needs to implement it.
But don't give up, it might happen. I remember the feature that wrapped lines are indented with the same amount of the original line which was requested first in 2002, IIRC. Finally, this has been implemented recently and was released two days ago :).
Regards, Enrico
2009/7/4 Enrico Tröger enrico.troeger@uvena.de:
On Thu, 2 Jul 2009 16:07:42 +0200, Filip wrote:
http://sourceforge.net/tracker/index.php?func=detail&aid=982384&grou...
It seems, we are hardly the first people to notice this, but strangely the request was rejected. Any idea what can be done next?
What Neil said: someone needs to implement it.
But don't give up, it might happen.
My impression is that Neil is fairly reasonable about accepting patches from other people (for example, anyone reading this list who has enough skill, time, and desire to write them). If a patch doesn't break any existing API or behavior, doesn't negatively impact performance/resource usage, and is clean and understandable to Neil, there is a good chance he will put it into the next release.
I personally do not have the skill, nor the time, nor the desire for such a thing, but I have heard other people say that Scintilla is fairly well written and understandable for those who know C++. So when Neil says "someone needs to implement it", maybe that someone can be a reader of this list.
John
My impression is that Neil is fairly reasonable about accepting patches from other people (for example, anyone reading this list who has enough skill, time, and desire to write them). If a patch doesn't break any existing API or behavior, doesn't negatively impact performance/resource usage, and is clean and understandable to Neil, there is a good chance he will put it into the next release.
So if I need it bad enough, I can write myself. Fair enough.
On Sat, 4 Jul 2009 16:17:20 -0400, John wrote:
2009/7/4 Enrico Tröger enrico.troeger@uvena.de:
On Thu, 2 Jul 2009 16:07:42 +0200, Filip wrote:
http://sourceforge.net/tracker/index.php?func=detail&aid=982384&grou...
It seems, we are hardly the first people to notice this, but strangely the request was rejected. Any idea what can be done next?
What Neil said: someone needs to implement it.
But don't give up, it might happen.
My impression is that Neil is fairly reasonable about accepting patches from other people (for example, anyone reading this list who has enough skill, time, and desire to write them). If a patch doesn't break any existing API or behavior, doesn't negatively impact performance/resource usage, and is clean and understandable to Neil, there is a good chance he will put it into the next release.
I never intended to say anything else. Full ACK.
Regards, Enrico