Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Frank Lanitz
On Sun, 14 Aug 2011 22:27:13 +0200
Enrico Tröger  wrote:

> On Sun, 14 Aug 2011 11:37:42 -0700, Matthew wrote:
> 
> Hola,
> 
> >P.S. Above are you saying the Devhelp plugin *won't* build on your 
> >system or that it just didn't need any changes to build?  I'm just 
> >wondering because I've received very little feedback on it, so maybe 
> >it's not building for people?
> 
> Sorry for not being clear, on my system it is just because I have
> libdevhelp in version 3.0.0 (Debian Testing, 3.0 is the only version
> available) and the plugin wants 2.x. So I just couldn't test it
> because of missing build requirements, not the plugin's fault :D.

Unfortunately the same here. But I did use it for some time and liked
it. 

Cheers, 
Frank 
-- 
http://frank.uvena.de/en/


pgpgG77CPcBLi.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Lex Trotman
> the man says that most options (I thing there is details about which
> ones do) have a "no-" variants, and IIRC that only the non-default is
> listed. AFAIK -fshow-column is the default since GGC 4.5, maybe you have
> checked a doc for GCC >= 4.5?

Looked at 4.4 and 4.6 and still only documented as a preprocessor option?

>
>> Maybe because which errors get columns is variable, until most have
>> the feature its not official yet.
>>
[...]
> Well, when a macro is used and it's the expanded code that triggers the
> warning, yes the line is the one at which the macro is used without
> further details on where in the expanded macro the problem is.

Yeah, same thing for C++ templates, and that is most of the standard
library for C++.

Anyway if Dimitar wants to decode the column numbers in
msgwin_parse_compiler_error_line() and use them to set the cursor
thats fine, so long as column number is optional.

Personally I wouldn't bother to add column numbers to the fallback
msgwindow.c/parse_compiler_error().

Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Colomban Wendling
Le 15/08/2011 01:05, Lex Trotman a écrit :
>> It's IMHO important not to depend on GNU grep, AFAIK even BSDs will not
>> have it, at least by default (though maybe the implement some of the GNU
>> grep's features, don't know).
>>
> 
> +1
> 
>>> [...]
> 
>>
>> -fshow-column
>>
> 
> There is a documented -fno-show-column for the preprocessor only.
> Clang documents -fshow-column.  The GCC mailing lists seem to suggest
> it exists, but until it is documented...

the man says that most options (I thing there is details about which
ones do) have a "no-" variants, and IIRC that only the non-default is
listed. AFAIK -fshow-column is the default since GGC 4.5, maybe you have
checked a doc for GCC >= 4.5?

> Maybe because which errors get columns is variable, until most have
> the feature its not official yet.
> 
>>> And I still claim that (at least for C++) the line number is only
>>> approximate anyway :-)
>>
>> For C it's pretty relevant :)
> 
> Yes well, it doesn't have templates, but then macros and missing
> brackets confuse it too.

Well, when a macro is used and it's the expanded code that triggers the
warning, yes the line is the one at which the macro is used without
further details on where in the expanded macro the problem is.

Cheers,
Colomban
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Lex Trotman
> It's IMHO important not to depend on GNU grep, AFAIK even BSDs will not
> have it, at least by default (though maybe the implement some of the GNU
> grep's features, don't know).
>

+1

>> [...]

>
> -fshow-column
>

There is a documented -fno-show-column for the preprocessor only.
Clang documents -fshow-column.  The GCC mailing lists seem to suggest
it exists, but until it is documented...

Maybe because which errors get columns is variable, until most have
the feature its not official yet.

>> And I still claim that (at least for C++) the line number is only
>> approximate anyway :-)
>
> For C it's pretty relevant :)

Yes well, it doesn't have templates, but then macros and missing
brackets confuse it too.

Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Enrico Tröger
On Sun, 14 Aug 2011 11:37:42 -0700, Matthew wrote:

Hola,

>P.S. Above are you saying the Devhelp plugin *won't* build on your 
>system or that it just didn't need any changes to build?  I'm just 
>wondering because I've received very little feedback on it, so maybe 
>it's not building for people?

Sorry for not being clear, on my system it is just because I have
libdevhelp in version 3.0.0 (Debian Testing, 3.0 is the only version
available) and the plugin wants 2.x. So I just couldn't test it because
of missing build requirements, not the plugin's fault :D.

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc


pgpyU4oJq2uNm.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Matthew Brush

On 08/14/11 03:29, Enrico Tröger wrote:



So, if any of the plugin maintainers, don't want that I touch their
code slightly, either tell me or fix it yourself.


I just did it, sorry guys :).
It's just a small change, so don't hit me too hard or just come around
and let's have a beer together.
I added the config.h include for all the plugins which could be built
on my system (all except DevHelp and GeanyCFP) and now the build of
geany-plugins succeed again (on my system).
However, some plugins compile without any change and without an
inclusion of config.h. I'm not entirely sure why but leave this to the
plugin authors.


I think Devhelp doesn't have any translation support yet either, since I 
have no idea how to do this.  I'll check out the documents mentioned 
elsewhere in the thread for how to do this, though I can only translate 
into idiomatic English and broken French myself :)


I did try to fix this after your initial message, but all I needed to do 
was to include  in a few places where I'd forgotten it.


P.S. Above are you saying the Devhelp plugin *won't* build on your 
system or that it just didn't need any changes to build?  I'm just 
wondering because I've received very little feedback on it, so maybe 
it's not building for people?


Cheers,
Matthew Brush
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Colomban Wendling
Le 14/08/2011 10:12, Lex Trotman a écrit :
> [...]
>>> Yes, I was thinking of (ab)using the colour markings for this purpose,
>>> but we have already had problems with non-gnu grep, so maybe leave
>>> this until later.
>>
>> Perhaps just include gnu grep with geany if we're in fact depend on it?
> 
> IIRC the problem was to make sure it *didn't* depend on GNU grep only
> options or behavior.

It's IMHO important not to depend on GNU grep, AFAIK even BSDs will not
have it, at least by default (though maybe the implement some of the GNU
grep's features, don't know).

> [...]
>>> Erm... looks easy? which compiler are you using that gives a column
>>> position?
>>>
>>> GCC just gives a line number vaguely in the region that it sorta
>>> guesses is the error ;-D
>>>
>>
>> My gcc gives columns as well:
>> test.c: In function ‘main’:
>> test.c:13:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
>> ‘return’
>>
>> Perhaps a more recent feature.
>>
> 
> I'm using 4.4.3 (Ubuntu LTS version).  The same error does not have a
> column number, only missing #includes do and they have a column no
> beyond the end of the line??
> So could be a newer feature or is it an option?

-fshow-column

> And I still claim that (at least for C++) the line number is only
> approximate anyway :-)

For C it's pretty relevant :)
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Dimitar Zhekov
On Sun, 14 Aug 2011 14:27:10 +1000
Lex Trotman  wrote:

> > I get it now. FIF / Find Usage will certainly be better with line and
> > column positioning, including Enter / double-click. Maybe implement that
> > for the Compiler tab first? Looks easy, once I find where is the default
> > error_regex. Huh.
> 
> Erm... looks easy? which compiler are you using that gives a column position?

I meant that parsing the column will be easy. Though adding column
support to the message window requires some work, and the plugins ABI
must be changed. Only a few plugins use msgwin_msg_add*, but the
full patch will have to wait after out september release.

> GCC just gives a line number vaguely in the region that it sorta
> guesses is the error ;-D

It emits a column number pretty often on my system. Sometimes even close
to the actual error. :)

-- 
E-gards: Jimmy
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Enrico Tröger
On Sun, 14 Aug 2011 13:48:00 +0200, Hans wrote:

>El dom, 14-08-2011 a las 13:12 +0200, Enrico Tröger escribió:
>> On Sun, 14 Aug 2011 12:46:56 +0200, Hans wrote:
>> 
>> >El dom, 14-08-2011 a las 12:29 +0200, Enrico Tröger escribió:
>> >> On Sat, 13 Aug 2011 17:12:08 +0200, Colomban wrote:
>> >> However, some plugins compile without any change and without an
>> >> inclusion of config.h. I'm not entirely sure why but leave this to
>> >> the plugin authors.
>> >
>> >My plugin (GeanyPG) still worked, I think it is because i didn't add
>> >any internationalization support yet, but i'm working on that now I
>> 
>> You already use _() in PLUGIN_SET_INFO().
>> But maybe this works because you include locale.h directly in
>> geanypg.h. This can be removed because locale.h is pulled in by
>> geanyplugin.h, IIRC.
>> 
>> 
>> Btw, did you read my post in May about GeanyPG and aux.c:
>> http://lists.uvena.de/geany-devel/2011-May/004827.html
>Sorry, I must have missed that one, I changed the filename, but now i 
>can't find which file i have to change to get automake working again.

Seems you found the Makefile.am in r2141 :).
Thanks for renaming the file.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc


pgp4xg8kY3JZR.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Per-filetype indentation settings

2011-08-14 Thread Colomban Wendling
Le 14/08/2011 06:54, Lex Trotman a écrit :
> Hi Colomban,
> 
> On 14 August 2011 06:17, Colomban Wendling  wrote:
>> Hi,
>>
>> Recent bug report #3390435 [1] remembered me about per-filetype
>> indentation settings.  This would remove hard-coded settings we have for
>> Makefile and Fortran 77, moving the setting to the filetype definitions,
>> as well as allowing further per-filetype tweaking -- e.g. we could
>> imagine that somebody would like to have Python set to "4 spaces" to
>> follow PEP8.
> 
> Good idea.
> 
>>
>> I have come with an initial implementation and would like your wise
>> criticism and design opinions.
> 
> I havn't had the chance to try it, but by my (questionable) inspection
> it looks ok.

At least another pair of eyes looked at the code and didn't see anything
obvious :)

>> A few trivial questions:
>>  * should the settings be "indent_type" and "indent_width" under
>> [settings] rather than adding a new section?
> 
> I don't see much difference, so keep your existing implementation.

Actually, I think using sections rather than prefixing the key's name is
probably better (that's the reason I did so in the first place), but
OTOH all our current settings uses prefixed names in the [settings]
section... anyway probably not a big deal.

>>  * do you think it's sensible to reset the indentation settings when
>> switch from a filetype that had specific settings?
> 
> Settings should take the value of the most specific setting present,
> ie individual file specific, user filetype specific, system filetype
> specific, user general preference, system general setting/default
> value.  If something changes in that sequence like changing the
> filetype then yes it should change.

That was my thinking too.  The only thing we may want to add is the
ability to re-do the auto-detection in such cases (or remember the
previous values, but it looks quite overkill).

>>  * do you think the filetype-specific settings should override the
>> auto-detection? (the second patch makes auto-detection prevail)
>>
> 
> Well if they do and there is a filetype setting for every filetype,
> how do the detected settings get used?

They wouldn't, that's the reason I did the 2nd patch :)

> Would need a menu option and
> possibly an option on the file open dialog to say use detected
> settings.  And a preference of course.

Well, we already have a pref to chose whether to auto-detect or not
(actually, two: one for type and one for width).  So either we add two
more filetype settings to choose whether auto-detection can override the
defined values, or we leave this to the current global preferences and
don't override them at all.

> PS minor English correction for the documentation, "allows to define"
> S/B "allows definition of"

Fixed, thanks :)


Cheers,
Colomban
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Hans Alves
El dom, 14-08-2011 a las 13:12 +0200, Enrico Tröger escribió:
> On Sun, 14 Aug 2011 12:46:56 +0200, Hans wrote:
> 
> >El dom, 14-08-2011 a las 12:29 +0200, Enrico Tröger escribió:
> >> On Sat, 13 Aug 2011 17:12:08 +0200, Colomban wrote:
> >> However, some plugins compile without any change and without an
> >> inclusion of config.h. I'm not entirely sure why but leave this to
> >> the plugin authors.
> >
> >My plugin (GeanyPG) still worked, I think it is because i didn't add
> >any internationalization support yet, but i'm working on that now I
> 
> You already use _() in PLUGIN_SET_INFO().
> But maybe this works because you include locale.h directly in
> geanypg.h. This can be removed because locale.h is pulled in by
> geanyplugin.h, IIRC.
> 
> 
> Btw, did you read my post in May about GeanyPG and aux.c:
> http://lists.uvena.de/geany-devel/2011-May/004827.html
Sorry, I must have missed that one, I changed the filename, but now i 
can't find which file i have to change to get automake working again.
> 
> Regards,
> Enrico
> 
> ___
> Geany-devel mailing list
> Geany-devel@uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Enrico Tröger
On Sun, 14 Aug 2011 12:46:56 +0200, Hans wrote:

>El dom, 14-08-2011 a las 12:29 +0200, Enrico Tröger escribió:
>> On Sat, 13 Aug 2011 17:12:08 +0200, Colomban wrote:
>> However, some plugins compile without any change and without an
>> inclusion of config.h. I'm not entirely sure why but leave this to
>> the plugin authors.
>
>My plugin (GeanyPG) still worked, I think it is because i didn't add
>any internationalization support yet, but i'm working on that now I

You already use _() in PLUGIN_SET_INFO().
But maybe this works because you include locale.h directly in
geanypg.h. This can be removed because locale.h is pulled in by
geanyplugin.h, IIRC.


Btw, did you read my post in May about GeanyPG and aux.c:
http://lists.uvena.de/geany-devel/2011-May/004827.html

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc


pgpNJ9F04gDOU.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Frank Lanitz
Hi, 

On Sun, 14 Aug 2011 12:46:56 +0200
Hans Alves  wrote:

> El dom, 14-08-2011 a las 12:29 +0200, Enrico Tröger escribió:
> > On Sat, 13 Aug 2011 17:12:08 +0200, Colomban wrote:
> > However, some plugins compile without any change and without an
> > inclusion of config.h. I'm not entirely sure why but leave this to the
> > plugin authors.
> 
> My plugin (GeanyPG) still worked, I think it is because i didn't add any 
> internationalization support yet, but i'm working on that now I should at 
> least be able to make spanish and dutch translations. However, I'm not 
> familiar with the whole generalization process, is there a document with
> steps i need to take or some other guide?
> Right now i placed all translatable strings in a _() macro, but i'm not
> sure what to do next.

A couple of day ago I've added some info to plugin howto. Please check 
http://www.geany.org/manual/reference/howto.html
Maybe it solves a couple of oyur questions. 

Cheers, 
Frank 
-- 
Frank Lanitz 


pgpE4eP9LvZJ6.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Hans Alves
El dom, 14-08-2011 a las 12:29 +0200, Enrico Tröger escribió:
> On Sat, 13 Aug 2011 17:12:08 +0200, Colomban wrote:
> However, some plugins compile without any change and without an
> inclusion of config.h. I'm not entirely sure why but leave this to the
> plugin authors.

My plugin (GeanyPG) still worked, I think it is because i didn't add any 
internationalization support yet, but i'm working on that now I should at 
least be able to make spanish and dutch translations. However, I'm not 
familiar with the whole generalization process, is there a document with
steps i need to take or some other guide?
Right now i placed all translatable strings in a _() macro, but i'm not
sure what to do next.

Regards
Hans

___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] Broken geany-plugins build

2011-08-14 Thread Enrico Tröger
On Sat, 13 Aug 2011 17:12:08 +0200, Colomban wrote:

>Le 13/08/2011 15:18, Enrico Tröger a écrit :
>> On Wed, 03 Aug 2011 15:20:26 +, colomb...@users.sourceforge.net
>> wrote:
>> 
>>> Revision: 5882
>>>  http://geany.svn.sourceforge.net/geany/?rev=5882&view=rev
>>> Author:   colombanw
>>> Date: 2011-08-03 15:20:26 + (Wed, 03 Aug 2011)
>>>
>>> Log Message:
>>> ---
>>> Only include config.h when building Geany
>>>
>>> config.h is not distributed, and we includ it from geany.h.  Even
>>> though it was only included it HAVE_CONFIG_H was defined, an
>>> Autotools based build system is likely to define it, and it becomes
>>> a problem if that very build system uses another header name than
>>> config.h.
>>>
>>> Closes #3384026
>> 
>> While this was good to change, it broke building (probably) all
>> plugins of the geany-plugins project.
>> 
>> We would need to add
>> #include "config.h"
>> to the plugins' main source files to fix the build. This should not
>> be a big problem in most cases, before I do that, I would just see if
>> there are any objections
>> 
>> So, if any of the plugin maintainers, don't want that I touch their
>> code slightly, either tell me or fix it yourself.

I just did it, sorry guys :).
It's just a small change, so don't hit me too hard or just come around
and let's have a beer together.
I added the config.h include for all the plugins which could be built
on my system (all except DevHelp and GeanyCFP) and now the build of
geany-plugins succeed again (on my system).
However, some plugins compile without any change and without an
inclusion of config.h. I'm not entirely sure why but leave this to the
plugin authors.


>Wooops, I didn't though it could break external plugins relying on
>implicit inclusion of config.h, my bad :/

Nah, rather the fault of the plugin authors, including me.


>BTW, I fixed my plugin(s), and I can help the fixing other if needed
>(though I doubt we need to be two doing this).

Heh, no.


Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.asc


pgpcNhTBJpRXn.pgp
Description: PGP signature
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Lex Trotman
[...]
>> Yes, I was thinking of (ab)using the colour markings for this purpose,
>> but we have already had problems with non-gnu grep, so maybe leave
>> this until later.
>
> Perhaps just include gnu grep with geany if we're in fact depend on it?

IIRC the problem was to make sure it *didn't* depend on GNU grep only
options or behavior.

[...]
>> Erm... looks easy? which compiler are you using that gives a column
>> position?
>>
>> GCC just gives a line number vaguely in the region that it sorta
>> guesses is the error ;-D
>>
>
> My gcc gives columns as well:
> test.c: In function ‘main’:
> test.c:13:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
> ‘return’
>
> Perhaps a more recent feature.
>

I'm using 4.4.3 (Ubuntu LTS version).  The same error does not have a
column number, only missing #includes do and they have a column no
beyond the end of the line??
So could be a newer feature or is it an option?

And I still claim that (at least for C++) the line number is only
approximate anyway :-)

Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


Re: [Geany-devel] msgwin line and column position [was: Expose yellow wavy line in GeanyIndicators]

2011-08-14 Thread Thomas Martitz

Am 14.08.2011 06:27, schrieb Lex Trotman:

[..]

FIF will have to ask grep to mark the match(s) on the line and parse
them for character positions to be selected

That can be a bit tricky. -o -b returns what we need, but the normal
output is be lost, while --color=always will do, but the parsing is a
bit more complex, and we should invoke grep with a GREP_COLORS prefix.
Both assume GNU grep, of course.

Yes, I was thinking of (ab)using the colour markings for this purpose,
but we have already had problems with non-gnu grep, so maybe leave
this until later.


Perhaps just include gnu grep with geany if we're in fact depend on it?


What I meant is that focusing the window is not much use if the cursor
position is going to be start of line, since I have to click in the
window anyway to position the cursor (unless it happens that I want
something close to the start). [...]

I get it now. FIF / Find Usage will certainly be better with line and
column positioning, including Enter / double-click. Maybe implement that
for the Compiler tab first? Looks easy, once I find where is the default
error_regex. Huh.


Erm... looks easy? which compiler are you using that gives a column position?

GCC just gives a line number vaguely in the region that it sorta
guesses is the error ;-D



My gcc gives columns as well:
test.c: In function ‘main’:
test.c:13:2: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ 
before ‘return’


Perhaps a more recent feature.


Cheers
Lex
___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel


___
Geany-devel mailing list
Geany-devel@uvena.de
https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel