[Geany-Devel] Compiler tab suggestions

Dimitar Zhekov dimitar.zhekov at xxxxx
Sun Jan 19 12:51:24 UTC 2014

On Sat, 18 Jan 2014 17:10:37 +0200
Arthur Rosenstein <artros.misc at gmail.com> wrote:

> I took a quick glance at patch 11 [...] It treats compiler "column
> numbers" as if they're actually column numbers, while in reality
> they almost never are. Which means that it's not going to work
> right as soon as the code contains tabs or multibyte characters.

Hmmm... :)

<tab><tab>(s - text == 10 && "боза" xxx ...     [utf-8]

utils.c:643:33: error: expected ')' before 'xxx'

Double click on the message: seeks to the first 'x', Geany status
bar shows line 643, column 43 (column # depends on the tab size).

But it *does* seek to 'а' if "боза" is locale.

> Since it doesn't use named capture groups for the message
> parsing, it's a little less flexible in the type of messages
> it can parse

line [column] filename, or filename line [column]

If no regex is specified (and most people leave it blank I think),
the "fallback" Geany parser requires only one of filename or line
(default filename == that of the current document).

With a regex, both the filename and line are mandatory (though the
regex Geany parser can be modified to make the line optional).

P11 adds an optional column without altering the above behaviour.

> and it also cannot handle different
> styles of error messages in the same regex.


Or if you mean errors vs. warnings, Geany does not support such a
distinction, and P11 only adds an optional column.

> The example given in the documentation is actually
> not going to work when the column number is missing.

echo "test.py:7:24: E202 whitespace before ']'" |
egrep '([^:]+):([0-9] +):([0-9]+): |([^:]+):([0-9]+): '
test.py:7:24: E202 whitespace before ']'

echo "test.py:7: E202 whitespace before ']'" |
egrep '([^:]+):([0-9]+): ([0-9]+): |([^:]+):([0-9]+): '
test.py:7: E202 whitespace before ']'

Overall, P11 is a minimal implementation, which handles most of
the cases, with very small regex changes (an optional 3rd match).
PR 191 is the maximum implementation. Both have pros and cons.

IMHO, such questions should be decided with a vote.

E-gards: Jimmy

More information about the Devel mailing list