Hi,
Right now there are only two values in GeanyIndicators. There is a cool red underline for errors, but it would be even cooler to have a yellow wavy underline for warnings. Would that be possible for you to expose such value there?
2011/8/5 Filip Gruszczyński gruszczy@gmail.com:
Hi,
Right now there are only two values in GeanyIndicators. There is a cool red underline for errors, but it would be even cooler to have a yellow wavy underline for warnings. Would that be possible for you to expose such value there?
Sounds reasonable to me, can you submit a patch (I think for editor.h and highlighting.c but do check if anything else is needed).
Cheers Lex
PS and if you want to add the ability for the standard system to have another regex for differentiating warnings from errors that would be even cooler, but a lot more work.
-- Filip Gruszczyński _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Sounds reasonable to me, can you submit a patch (I think for editor.h and highlighting.c but do check if anything else is needed).
I have attached some patch, I hope it is enough.
PS and if you want to add the ability for the standard system to have another regex for differentiating warnings from errors that would be even cooler, but a lot more work.
Do you have in mind building? From what I saw in code (mind I don't build anything usually, I am mostly Python programmer and if I build I just run make from the terminal), the red indicator is used to mark some errors in code. I understand that Geany parses output of the compiler and sets indicators in proper places? So I could also try to parse warnings in the compiler output and set those indicators there?
2011/8/5 Filip Gruszczyński gruszczy@gmail.com:
Sounds reasonable to me, can you submit a patch (I think for editor.h and highlighting.c but do check if anything else is needed).
I have attached some patch, I hope it is enough.
I would have used ...WARNING = 9, see the comment 3 lines below.
Does it work with your pyflakey :-D plugin, I assumed that was what you wanted it for?
PS and if you want to add the ability for the standard system to have another regex for differentiating warnings from errors that would be even cooler, but a lot more work.
Do you have in mind building? From what I saw in code (mind I don't build anything usually, I am mostly Python programmer and if I build I just run make from the terminal), the red indicator is used to mark some errors in code. I understand that Geany parses output of the compiler and sets indicators in proper places? So I could also try to parse warnings in the compiler output and set those indicators there?
Thats a lot more work, ATM Geany only has one regex used to extract lines containing error messages and the related line numbers they occur in, so the error message can link to the source line. Those source lines get the wavey red underline indicator.
There needs to be some way of having the regex distinguish which messages are errors and which are warnings and then use different indicators.
Currently the line number and the filename are extracted as two matches in the regex, maybe the third match group could be for a warning line number if there was no error line number. Or preferably named matches error_line, warning_line and filename could be used if Geany's regex supports it.
Note that if the regex does not exist a fallback hack (which I described recently as a hairy hardcoded heuristic) is used. I don't suggest changing this.
Cheers Lex
-- Filip Gruszczyński
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
I would have used ...WARNING = 9, see the comment 3 lines below.
Yes, I have read this comment. I though that this is a lexer indicator, that's why I set to 1, right after the _ERROR. Have I got it wrong?
Does it work with your pyflakey :-D plugin, I assumed that was what you wanted it for?
I haven't tried that yet. I understand I would need to increase some API level to see that. I am using Geany 0.20 that is distributed with current Fedora.
Note that if the regex does not exist a fallback hack (which I described recently as a hairy hardcoded heuristic) is used. I don't suggest changing this.
I don't think it is good idea for me to touch it. I have very little understanding how Geany, Scintilla and Gtk work, and truth be told, I don't do C coding in Geany. I need Python tools and this is what I would like to focus on :-)
2011/8/6 Filip Gruszczyński gruszczy@gmail.com:
I would have used ...WARNING = 9, see the comment 3 lines below.
Yes, I have read this comment. I though that this is a lexer indicator, that's why I set to 1, right after the _ERROR. Have I got it wrong?
Yes, the errors are not detected by the lexers, but by Geany from the build commands ie the container, hence I think it should be 9.
Does it work with your pyflakey :-D plugin, I assumed that was what you wanted it for?
I haven't tried that yet. I understand I would need to increase some API level to see that. I am using Geany 0.20 that is distributed with current Fedora.
Ok, just a gentle note, you should never submit patches you havn't tested.
Note that if the regex does not exist a fallback hack (which I described recently as a hairy hardcoded heuristic) is used. I don't suggest changing this.
I don't think it is good idea for me to touch it. I have very little understanding how Geany, Scintilla and Gtk work, and truth be told, I don't do C coding in Geany. I need Python tools and this is what I would like to focus on :-)
Ok, I guess all you can do is submit a feature request since this change needs C coding.
Cheers Lex
-- Filip Gruszczyński _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Yes, the errors are not detected by the lexers, but by Geany from the build commands ie the container, hence I think it should be 9.
I'll fix this.
Ok, just a gentle note, you should never submit patches you havn't tested.
I understand. It's just my laziness..
Anyway, I removed geany shipped from Fedora and installed geany from svn with patch. When I try to compile now my plugin to see if I can access those yellow indicators, I get information that pkg-config can't find geany.pc. When I installed geany using yum I had to install geany-devel package. What do I have to install also when I build geany from source to have this geany.pc?
Ok, I guess all you can do is submit a feature request since this change needs C coding.
Do you wish me to do it? It's not really a feature I need, so I would rather get some more Python support :-P
2011/8/6 Filip Gruszczyński gruszczy@gmail.com:
Yes, the errors are not detected by the lexers, but by Geany from the build commands ie the container, hence I think it should be 9.
I'll fix this.
Ok, just a gentle note, you should never submit patches you havn't tested.
I understand. It's just my laziness..
Anyway, I removed geany shipped from Fedora and installed geany from svn with patch. When I try to compile now my plugin to see if I can access those yellow indicators, I get information that pkg-config can't find geany.pc. When I installed geany using yum I had to install geany-devel package. What do I have to install also when I build geany from source to have this geany.pc?
When you get the source from SVN you have all the development stuff so you don't need anything else.
If you did the usual configure; make; sudo make install it should have installed the geany.pc file for you, were there any errors in the process?
I just re-ran make install, the very last thing in install is to put geany.pc in $prefix/lib/pkgconfig so if you had any errors it might have missed it.
Ok, I guess all you can do is submit a feature request since this change needs C coding.
Do you wish me to do it? It's not really a feature I need, so I would rather get some more Python support :-P
Do the things you want to do :-) not trying to force you to do stuff you don't want or need.
Cheers Lex
When you get the source from SVN you have all the development stuff so you don't need anything else.
If you did the usual configure; make; sudo make install it should have installed the geany.pc file for you, were there any errors in the process?
I just re-ran make install, the very last thing in install is to put geany.pc in $prefix/lib/pkgconfig so if you had any errors it might have missed it.
geany.pc was installed properly, just my pkg-config isn't smart enough to look into /usr/local/lib/pkgconfig and I had to set up PKG_CONFIG_PATH.
I managed to get my plugin compiled and it displays yellow underline for warnings :-) However, this yellow seems a little to bright. Do you have any preferences to what RGB should be used for that? Shouldn't API version be increased, since new feature is exposed?
2011/8/6 Filip Gruszczyński gruszczy@gmail.com:
When you get the source from SVN you have all the development stuff so you don't need anything else.
If you did the usual configure; make; sudo make install it should have installed the geany.pc file for you, were there any errors in the process?
I just re-ran make install, the very last thing in install is to put geany.pc in $prefix/lib/pkgconfig so if you had any errors it might have missed it.
geany.pc was installed properly, just my pkg-config isn't smart enough to look into /usr/local/lib/pkgconfig and I had to set up PKG_CONFIG_PATH.
I managed to get my plugin compiled and it displays yellow underline for warnings :-)
Well done!
However, this yellow seems a little to bright. Do you
have any preferences to what RGB should be used for that? Shouldn't
Maybe something similar to the default string colour?
API version be increased, since new feature is exposed?
The person who commits it to SVN should do that at the time, maybe there will be other API changes committed before it or maybe several will be done at once.
And it may already be incremented from a previous change. I don't think it is intended for it to be incremented several times between releases.
Cheers Lex
-- Filip Gruszczyński _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
However, this yellow seems a little to bright. Do you
have any preferences to what RGB should be used for that? Shouldn't
Maybe something similar to the default string colour?
I have browsed through highlighting.c and tried to grep over the whole code base but I can't find the RGB code for this color. Could you help me with that?
And it may already be incremented from a previous change. I don't think it is intended for it to be incremented several times between releases.
I see. So only the color must be adjusted and this should be finished.
2011/8/15 Filip Gruszczyński gruszczy@gmail.com:
However, this yellow seems a little to bright. Do you
have any preferences to what RGB should be used for that? Shouldn't
Maybe something similar to the default string colour?
I have browsed through highlighting.c and tried to grep over the whole code base but I can't find the RGB code for this color. Could you help me with that?
Its a setting in filetypes.common not hard coded = 0xff901e
And it may already be incremented from a previous change. I don't think it is intended for it to be incremented several times between releases.
I see. So only the color must be adjusted and this should be finished.
Just submit the completed patch & someone will look at it for committing. Do please be patient, all are volunteers and workload varies. But do prompt if no response.
Cheers Lex
On Aug 5, 2011 10:08 AM, "Filip Gruszczyński" gruszczy@gmail.com wrote:
I would have used ...WARNING = 9, see the comment 3 lines below.
Yes, I have read this comment. I though that this is a lexer indicator, that's why I set to 1, right after the _ERROR. Have I got it wrong?
Does it work with your pyflakey :-D plugin, I assumed that was what you wanted it for?
I haven't tried that yet. I understand I would need to increase some API level to see that. I am using Geany 0.20 that is distributed with current Fedora.
Note that if the regex does not exist a fallback hack (which I described recently as a hairy hardcoded heuristic) is used. I don't suggest changing this.
I don't think it is good idea for me to touch it. I have very little understanding how Geany, Scintilla and Gtk work, and truth be told, I don't do C coding in Geany. I need Python tools and this is what I would like to focus on :-)
-- Filip Gruszczyński _______________________________________________ Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany