Hello,
I'm developing a new language, and I would like Geany to handle it. It has a compiler which is a pyhon program. I could use this custom build command under linux:
python /whatever_path/compiler.py "%f"
and it works. However, under windows this custom build command:
C:\Python27\python.exe c:\whatever_path\compiler.py "%f"
does not work. When I press F8 then Geany starts python.exe (I can see it from the task manager). Then it takes a long time before it responds, telling that the compilation failed. If I start the very same command line in a terminal (cmd.exe) then it runs within 0.1 sec.
What can be the problem?
My other question is about interpreting the output of my compiler - but first I would like to be able to use it under Windows.
Thanks,
Laszlo
On 12-07-18 01:23 PM, Laszlo Nagy wrote:
Hello,
I'm developing a new language, and I would like Geany to handle it. It has a compiler which is a pyhon program. I could use this custom build command under linux:
python /whatever_path/compiler.py "%f"
and it works. However, under windows this custom build command:
C:\Python27\python.exe c:\whatever_path\compiler.py "%f"
does not work. When I press F8 then Geany starts python.exe (I can see it from the task manager). Then it takes a long time before it responds, telling that the compilation failed. If I start the very same command line in a terminal (cmd.exe) then it runs within 0.1 sec.
What can be the problem?
What version of Geany are you using? IIRC there was some changes some time ago to fix quoting for how it runs spawns commands. Also if `whatever_path` has spaces and is unquoted it might cause problems, not sure though for Windows.
My other question is about interpreting the output of my compiler - but first I would like to be able to use it under Windows.
This might be useful: http://www.gnu.org/prep/standards/standards.html#Errors
I'm not sure how strictly Geany follows that but it seems to be quite standard across various tools I've used.
Cheers, Matthew Brush
On 19 July 2012 06:23, Laszlo Nagy gandalf@shopzeus.com wrote:
Hello,
I'm developing a new language, and I would like Geany to handle it. It has a compiler which is a pyhon program. I could use this custom build command under linux:
python /whatever_path/compiler.py "%f"
and it works. However, under windows this custom build command:
C:\Python27\python.exe c:\whatever_path\compiler.py "%f"
does not work. When I press F8 then Geany starts python.exe (I can see it from the task manager). Then it takes a long time before it responds, telling that the compilation failed.
This is not clear if the compiler actually does not run or if it runs and takes a long time and then gives an error?
What error (if any) do you get from python?
Try if it will run a "hello world" python program located in the same place as the compiler, see if the -vv option provides any info.
Cheers Lex
If I start the very same command line
in a terminal (cmd.exe) then it runs within 0.1 sec.
What can be the problem?
My other question is about interpreting the output of my compiler - but first I would like to be able to use it under Windows.
Thanks,
Laszlo
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
This is not clear if the compiler actually does not run or if it runs and takes a long time and then gives an error?
What error (if any) do you get from python?
Try if it will run a "hello world" python program located in the same place as the compiler, see if the -vv option provides any info.
Thank you.
The compiler did run (I could see it in the task manager) but it was not exiting for a minute or so. After I restarted my computer, everything started to work as expected. (Not sure why.)
I read GNU coding standards:
http://www.gnu.org/prep/standards/standards.html#Errors
I can make my custom compiler use these kind of messages:
sourcefile:line1.column1-line2.column2: message
Here are some more questions:
* The above format cannot be used under windows, because the source file name can have a colon in it. (E.g. C:\temp\text.txt:12:14). I really want to use absolute file names, because the compiler that I write is able to read source files from different drives automatically, and because the files are organized in packages (so two file can have the same name if they are in different packages). How to overcome that problem? * Unfortunately, the message can also contain a colon. What to do with that? * How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it. * Another question: can I make Geany open a file if it is not opened yet? E.g. a file is listed in an error message, but it is not opened in Geany yet. I would like Geany to open that file when I click or double click the error message.
Thanks,
Laszlo
On 12-07-18 09:23 PM, Laszlo Nagy wrote:
This is not clear if the compiler actually does not run or if it runs and takes a long time and then gives an error?
What error (if any) do you get from python?
Try if it will run a "hello world" python program located in the same place as the compiler, see if the -vv option provides any info.
Thank you.
The compiler did run (I could see it in the task manager) but it was not exiting for a minute or so. After I restarted my computer, everything started to work as expected. (Not sure why.)
I read GNU coding standards:
http://www.gnu.org/prep/standards/standards.html#Errors
I can make my custom compiler use these kind of messages:
sourcefile:line1.column1-line2.column2: message
Here are some more questions:
- The above format cannot be used under windows, because the source file name can have a colon in it. (E.g. C:\temp\text.txt:12:14). I really want to use absolute file names, because the compiler that I write is able to read source files from different drives automatically, and because the files are organized in packages (so two file can have the same name if they are in different packages). How to overcome that problem?
- Unfortunately, the message can also contain a colon. What to do with that?
- How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it.
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Cheers, Matthew Brush
- How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it.
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
I have also read http://www.geany.org/manual/hacking.html#error-message-parsing which says:
New-style error message parsing is done with an extended GNU-style regex stored in the filetypes.foo file - see the [build_settings] information in the manual for details.
But it is not very helpful, since the manual on [build_settings] does not tell how to do it. (Or maybe there are two versions of that documentation and I'm looking at the wrong place?)
Thanks,
Laszlo
On 12-07-18 10:32 PM, Laszlo Nagy wrote:
- How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it.
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
I have also read http://www.geany.org/manual/hacking.html#error-message-parsing which says:
New-style error message parsing is done with an extended GNU-style regex stored in the filetypes.foo file - see the [build_settings] information in the manual for details.
But it is not very helpful, since the manual on [build_settings] does not tell how to do it. (Or maybe there are two versions of that documentation and I'm looking at the wrong place?)
It looks like there's a lot of hardcoded stuff in `msgwindow.c`.
Some of these functions look relevant on a quick scan:
* msgwindow.c:801: parse_compiler_error_line() * msgwindow.c:248: get_color() * msgwindow.c:1189: show_build_result_message()
I'm not really too familiar with that code though, so maybe there is an easier way than hacking the source.
Cheers, Matthew Brush
On 19 July 2012 15:52, Matthew Brush mbrush@codebrainz.ca wrote:
On 12-07-18 10:32 PM, Laszlo Nagy wrote:
- How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it.
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
I have also read http://www.geany.org/manual/hacking.html#error-message-parsing which says:
New-style error message parsing is done with an extended GNU-style regex stored in the filetypes.foo file - see the [build_settings] information in the manual for details.
But it is not very helpful, since the manual on [build_settings] does not tell how to do it. (Or maybe there are two versions of that documentation and I'm looking at the wrong place?)
It looks like there's a lot of hardcoded stuff in `msgwindow.c`.
Hi Matthew,
Yeah, history was that Geany originally had coded recognition of "standard" error messages from a few "well known" compilers, but those tricky compiler writers either were non-standard (clang and its ^) or changed their message formats between versions (hi Python) so regexen were introduced to allow users to tailor the recognition without programming, but the old method was left for users who couldn't/didn't want to change the regexes.
Cheers Lex
Some of these functions look relevant on a quick scan:
- msgwindow.c:801: parse_compiler_error_line()
- msgwindow.c:248: get_color()
- msgwindow.c:1189: show_build_result_message()
I'm not really too familiar with that code though, so maybe there is an easier way than hacking the source.
Cheers, Matthew Brush
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 12-07-18 11:19 PM, Lex Trotman wrote:
On 19 July 2012 15:52, Matthew Brush mbrush@codebrainz.ca wrote:
On 12-07-18 10:32 PM, Laszlo Nagy wrote:
- How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it.
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
I have also read http://www.geany.org/manual/hacking.html#error-message-parsing which says:
New-style error message parsing is done with an extended GNU-style regex stored in the filetypes.foo file - see the [build_settings] information in the manual for details.
But it is not very helpful, since the manual on [build_settings] does not tell how to do it. (Or maybe there are two versions of that documentation and I'm looking at the wrong place?)
It looks like there's a lot of hardcoded stuff in `msgwindow.c`.
Hi Matthew,
Yeah, history was that Geany originally had coded recognition of "standard" error messages from a few "well known" compilers, but those tricky compiler writers either were non-standard (clang and its ^) or changed their message formats between versions (hi Python) so regexen were introduced to allow users to tailor the recognition without programming, but the old method was left for users who couldn't/didn't want to change the regexes.
So we could be using simple regexps in the default filetypes.* files instead of hundreds of lines of hand-parsing code and we don't?
Cheers, Matthew Brush
On 19 July 2012 15:32, Laszlo Nagy gandalf@shopzeus.com wrote:
- How to distinguish errors from warnings? I was reading the [build-menu] but I could only find some examples. It was not clear how to do it.
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
No this isn't possible, the regexes, or in their absence the built-in tests, just distinguish between a message that indicates a file and line number that Geany can jump to, and any other message. The purpose is to recognise the file and line information, not really to separate types of messages. The colour of messages is just to indicate that you can click on them or not.
Cheers Lex
I have also read http://www.geany.org/manual/hacking.html#error-message-parsing which says:
New-style error message parsing is done with an extended GNU-style regex stored in the filetypes.foo file - see the [build_settings] information in the manual for details.
But it is not very helpful, since the manual on [build_settings] does not tell how to do it. (Or maybe there are two versions of that documentation and I'm looking at the wrong place?)
Thanks,
Laszlo
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
No this isn't possible, the regexes, or in their absence the built-in tests, just distinguish between a message that indicates a file and line number that Geany can jump to, and any other message. The purpose is to recognise the file and line information, not really to separate types of messages. The colour of messages is just to indicate that you can click on them or not.
Thanks. But I still don't know how to do it. Obviously, I wouldn't like to browse C source files. In fact it was about 5 years ago when I last wrote a program in C, so even if I downloaded the sources, it wouldn't help.
On 19 July 2012 16:04, Laszlo Nagy gandalf@shopzeus.com wrote:
You can write a regex for what you need in the "Error regular expression" text box in the Build Commands configuration. I think you can also store the regexp in the `filetype.yourlanguage` file.
Docs: http://www.geany.org/manual/current/index.html#build-menu-configuration
Yes, I was aware of this. As I said, *i was reading the [build-menu]*. The question was: how to distinguish errors from warnings and notices? I would like Geany to display errors in red, warnings in blue and notices in green. Is that possible? Unfortunately, the link you sent says nothing about this.
No this isn't possible, the regexes, or in their absence the built-in tests, just distinguish between a message that indicates a file and line number that Geany can jump to, and any other message. The purpose is to recognise the file and line information, not really to separate types of messages. The colour of messages is just to indicate that you can click on them or not.
Thanks. But I still don't know how to do it. Obviously, I wouldn't like to browse C source files. In fact it was about 5 years ago when I last wrote a program in C, so even if I downloaded the sources, it wouldn't help.
A quick search of the manual for regex finds http://www.geany.org/manual/current/#build-settings-section for how the regex is used
Cheers Lex
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
Thanks. But I still don't know how to do it. Obviously, I wouldn't like to browse C source files. In fact it was about 5 years ago when I last wrote a program in C, so even if I downloaded the sources, it wouldn't help.
A quick search of the manual for regex finds http://www.geany.org/manual/current/#build-settings-section for how the regex is used
I could setup Geany so that it automatically opens files referenced from error messages (if they are not opened yet). It can also navigate to the good line number. How can I use non-capturing groups in the error parsing regex?
Here is an example. There are two kinds of error messages that I can get - because there can be an error in the compiler that I'm working on, and also there can be an error in the file that is being compiled:
Error message (type one):
File "/home/gandalf/Python/Lib/shopzeus/scripts/ssdlc.py", line 23, in <module>
Regexp (type one):
\s*File\s"([^"]+)", line (\d+), in\s*(.*)
Error message (type two):
/home/gandalf/Python/Lib/shopzeus/demos/ssdl/test/test.ssdl:53:9:Syntax error
Regexp (type two):
([^:]+):([^:]+):[^:]+:([^:]+)
Both of these errors can happen then I press F8, so I would like to capture both messages if possible. This is what I have tried:
(?:\s*File\s"([^"]+)", line (\d+), in\s*(.*))|(?:([^:]+):([^:]+):[^:]+:([^:]+))
But it does not capture errors in the compiler. Maybe my regular expression is wrong. Or maybe the non-capturing group "?:" does not work.
Here are some things that don't work:
* Cannot make a difference between warnings and errors. Now I know that this is a limitation of Geany and I can live with it. It would be a good improvement though. * My compiler actually can tell the column number of the error too. Geany cannot interpret column numbers in error messages, right? This could be a good improvement too. ( Should I post this as a request on the dev list? ) * It is a bit off topic. When using GNU style error messages under Windows, parts of the error messages are ambiguous. Because the parts should be separated with colons, but under Windows the file names can contain colons too. I understand that this is a limitation of the GNU standard, not Geany. And I know that I could use a different error message format. But I'm hesitant to do it. What is better: follow the standard, or make it working? Is there a way to have both?
Otherwise, I'm quite satisfied now. :-) Thank you for your help!
Best,
Laszlo
On 19 July 2012 17:38, Laszlo Nagy gandalf@shopzeus.com wrote:
Thanks. But I still don't know how to do it. Obviously, I wouldn't like to browse C source files. In fact it was about 5 years ago when I last wrote a program in C, so even if I downloaded the sources, it wouldn't help.
A quick search of the manual for regex finds http://www.geany.org/manual/current/#build-settings-section for how the regex is used
I could setup Geany so that it automatically opens files referenced from error messages (if they are not opened yet). It can also navigate to the good line number. How can I use non-capturing groups in the error parsing regex?
Presume you read http://www.geany.org/manual/gtk/glib/glib-regex-syntax.html since you seem to have it right below.
Here is an example. There are two kinds of error messages that I can get - because there can be an error in the compiler that I'm working on, and also there can be an error in the file that is being compiled:
Error message (type one):
File "/home/gandalf/Python/Lib/shopzeus/scripts/ssdlc.py", line 23, in
<module>
Regexp (type one):
\s*File\s"([^"]+)", line (\d+), in\s*(.*)
Error message (type two):
/home/gandalf/Python/Lib/shopzeus/demos/ssdl/test/test.ssdl:53:9:Syntax error
Regexp (type two):
([^:]+):([^:]+):[^:]+:([^:]+)
Both of these errors can happen then I press F8, so I would like to capture both messages if possible. This is what I have tried:
(?:\s*File\s"([^"]+)", line (\d+), in\s*(.*))|(?:([^:]+):([^:]+):[^:]+:([^:]+))
But it does not capture errors in the compiler. Maybe my regular expression is wrong. Or maybe the non-capturing group "?:" does not work.
IIUC Match group numbering is in the order they occur in the regex, not the order they match, so the "type two" regex groups are 3 and 4 which geany ignores. The method isn't really suited to mixed languages, but possibly you could manage a really messy combined regex that would not be very specific but would match both cases.
Here are some things that don't work:
Cannot make a difference between warnings and errors. Now I know that this is a limitation of Geany and I can live with it. It would be a good improvement though.
Agree, but "somebody has to do it" (tm).
Patches/pull requests are welcome :)
My compiler actually can tell the column number of the error too. Geany cannot interpret column numbers in error messages, right? This could be a good improvement too. ( Should I post this as a request on the dev list? )
As above.
It is a bit off topic. When using GNU style error messages under Windows, parts of the error messages are ambiguous. Because the parts should be separated with colons, but under Windows the file names can contain colons too. I understand that this is a limitation of the GNU standard, not Geany. And I know that I could use a different error message format. But I'm hesitant to do it. What is better: follow the standard, or make it working? Is there a way to have both?
Whats the VS standard? that would be considered the "standard" on windows not gnu.
Otherwise, I'm quite satisfied now. :-) Thank you for your help!
Best,
Laszlo
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 19/07/2012 09:30, Lex Trotman wrote:
On 19 July 2012 17:38, Laszlo Nagygandalf@shopzeus.com wrote:
Here is an example. There are two kinds of error messages that I can get - because there can be an error in the compiler that I'm working on, and also there can be an error in the file that is being compiled:
Error message (type one):
File "/home/gandalf/Python/Lib/shopzeus/scripts/ssdlc.py", line 23, in
<module>
Regexp (type one):
\s*File\s"([^"]+)", line (\d+), in\s*(.*)
Error message (type two):
/home/gandalf/Python/Lib/shopzeus/demos/ssdl/test/test.ssdl:53:9:Syntax error
Regexp (type two):
([^:]+):([^:]+):[^:]+:([^:]+)
Both of these errors can happen then I press F8, so I would like to capture both messages if possible. This is what I have tried:
(?:\s*File\s"([^"]+)", line (\d+), in\s*(.*))|(?:([^:]+):([^:]+):[^:]+:([^:]+))
But it does not capture errors in the compiler. Maybe my regular expression is wrong. Or maybe the non-capturing group "?:" does not work.
I couldn't find the problem with that regex exactly, but it seems to be the [^"]+ part.
This seems to work here: File\s(\S+?), line (\d+)|(\S+):(\S+):
It might need tweaking though. The regex doesn't have to match the entire line.
Also, the 2nd regex seems to be unnecessary as Geany already tries this pattern as a built in.
IIUC Match group numbering is in the order they occur in the regex, not the order they match, so the "type two" regex groups are 3 and 4 which geany ignores. The method isn't really suited to mixed
No, the type two matches start from 1.
Nick
On 19 July 2012 23:32, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 19/07/2012 09:30, Lex Trotman wrote:
On 19 July 2012 17:38, Laszlo Nagygandalf@shopzeus.com wrote:
Here is an example. There are two kinds of error messages that I can get
because there can be an error in the compiler that I'm working on, and also there can be an error in the file that is being compiled:
Error message (type one):
File "/home/gandalf/Python/Lib/shopzeus/scripts/ssdlc.py", line 23, in
<module>
Regexp (type one):
\s*File\s"([^"]+)", line (\d+), in\s*(.*)
Error message (type two):
/home/gandalf/Python/Lib/shopzeus/demos/ssdl/test/test.ssdl:53:9:Syntax error
Regexp (type two):
([^:]+):([^:]+):[^:]+:([^:]+)
Both of these errors can happen then I press F8, so I would like to capture both messages if possible. This is what I have tried:
(?:\s*File\s"([^"]+)", line (\d+), in\s*(.*))|(?:([^:]+):([^:]+):[^:]+:([^:]+))
But it does not capture errors in the compiler. Maybe my regular expression is wrong. Or maybe the non-capturing group "?:" does not work.
I couldn't find the problem with that regex exactly, but it seems to be the [^"]+ part.
This seems to work here: File\s(\S+?), line (\d+)|(\S+):(\S+):
It might need tweaking though. The regex doesn't have to match the entire line.
Also, the 2nd regex seems to be unnecessary as Geany already tries this pattern as a built in.
Good point, but it can't be quite a correct match or it would have worked for Laszlo.
IIUC Match group numbering is in the order they occur in the regex, not the order they match, so the "type two" regex groups are 3 and 4 which geany ignores. The method isn't really suited to mixed
No, the type two matches start from 1.
No, matches are numbered in the order of their ( and don't change even if the previous ones don't match because they were in a different alternate branch.
The ( after File is 1, the ( after line is 2, the two ( in :([^:]+):[^:]+:([^:]+)) are 3 and 4 so they would be ignored by geany since we only look at one and two.
Cheers Lex
Nick
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
On 19/07/2012 15:45, Lex Trotman wrote:
On 19 July 2012 23:32, Nick Treleavennick.treleaven@btinternet.com wrote:
IIUC Match group numbering is in the order they occur in the regex, not the order they match, so the "type two" regex groups are 3 and 4 which geany ignores. The method isn't really suited to mixed
No, the type two matches start from 1.
No, matches are numbered in the order of their ( and don't change even if the previous ones don't match because they were in a different alternate branch.
OK, I just tested this and you're right.
The ( after File is 1, the ( after line is 2, the two ( in :([^:]+):[^:]+:([^:]+)) are 3 and 4 so they would be ignored by geany since we only look at one and two.
Some update on the regexp.
At my workplace, I use Ubuntu. On that version, this regexp:
"([^"]+)":([^:]+):[^:]+:([^:]+):([^:]+)
Worked for this message:
"/home/gandalf/Python/Lib/shopzeus/demos/ssdl/test/test.ssdl":41:E:test.person_location.person.references:Definition per.person2 not found (#5).
I went home, updated my sources from svn and tried the same regexp under Windows, with this error message:
"c:\Python\Lib\shopzeus\demos\ssdl\test\test.ssdl":41:E:test.person_location.person.references:Definition per.person2 not found (#5).
It doesn't work. Geany displays the error message in black&white color. When I click on the message, nothing happens.
Is this a Geany version related problem (0.21) or a Windows related thing?
Thanks,
Laszlo
On 20 July 2012 05:39, Laszlo Nagy gandalf@shopzeus.com wrote:
Some update on the regexp.
At my workplace, I use Ubuntu. On that version, this regexp:
"([^"]+)":([^:]+):[^:]+:([^:]+):([^:]+)
Worked for this message:
"/home/gandalf/Python/Lib/shopzeus/demos/ssdl/test/test.ssdl":41:E:test.person_location.person.references:Definition per.person2 not found (#5).
I went home, updated my sources from svn and tried the same regexp under Windows, with this error message:
"c:\Python\Lib\shopzeus\demos\ssdl\test\test.ssdl":41:E:test.person_location.person.references:Definition per.person2 not found (#5).
It doesn't work. Geany displays the error message in black&white color. When I click on the message, nothing happens.
Is this a Geany version related problem (0.21) or a Windows related thing?
Possibly version related, the regex engine was changed between 0.21 and 1.22.
Cheers Lex
Thanks,
Laszlo
Geany mailing list Geany@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany
No this isn't possible, the regexes, or in their absence the built-in tests, just distinguish between a message that indicates a file and line number that Geany can jump to, and any other message.
Oh, I'm sorry. I misunderstood. So making a difference between errors and warnings is not possible. Sorry.
Now I have found this:
http://www.geany.org/manual/current/#substitutions-in-commands-and-working-d...
I'll try to write a regex for this and let you know the results.
Thank you!
Laszlo
On 18/07/2012 21:23, Laszlo Nagy wrote:
I could use this custom build command under linux:
python /whatever_path/compiler.py "%f"
and it works. However, under windows this custom build command:
C:\Python27\python.exe c:\whatever_path\compiler.py "%f"
does not work. When I press F8 then Geany starts python.exe (I can see it from the task manager). Then it takes a long time before it responds, telling that the compilation failed. If I start the very same command line in a terminal (cmd.exe) then it runs within 0.1 sec.
This sounds like an annoying problem I have run into on Windows also. If you check Help->Debug Messages after the long wait (30 seconds?), I expect you see a message like:
CreateChildProcess: CreateProcess failed
In the latest Git version, I've added a status bar message explaining that the process timed out - although really it is not a time out but a bug in Windows process spawning. If you build from source, you can replace '30*1000' in src/win32.c to something smaller like '5*1000' for 5s, but this causes problems if a process really does take more than that time.
I've tried to find a real solution but failed, and ideally it should be asynchronous spawning anyway.
Nick