[Geany-Devel] Symbols containing '.' break symbols pane

Colomban Wendling lists.ban at xxxxx
Wed May 15 01:29:39 UTC 2013

Le 11/05/2013 04:44, Lex Trotman a écrit :
> Colomban,
> Did some more research.
> 1. Doesn't happen with rest (I think I must have had the filetype set
> wrong when I found it before, hence geany.txt is now marked for filetype :)
> 2. in symbols_get_context_separator() rest returns something other than '.'
> 3. tried returning impossible rubbish "!@#$%^&*()_" for other markup
> languages and they now work like rest.
> 4. tried returning null string "" but got infinite loop, didn't dare
> return NULL :)
> So what is the correct way of saying "no context separator for this
> filetype"?

There are currently none.  Context separators are used to separate names
in fully or partially qualified names, like in "Foo<sep>Bar".  So this
separator string should be one put in tags scope by ctags.

However, some language indeed don't put any, and generate unqualified
scopes -- as does the ASCIIDoc one.

We don't currently have anything to specify "no separator", but we
probably could go for some ASCII control sequence, like ETX (\x04, End
of Text), EOT (\04, End of Transmission) or pretty much anything that's
not printable or blank.

BTW as we discussed on IRC, we can't really return "" (empty string) or
NULL because it would somewhat break the plugin API (and it would
actually break plugin geanygendoc).

> Other than markup languages, are there any others that do not have
> context separators, or it is not '.' (other than ruby commented
> in symbols_get_context_separator)

Do you expect me to know every language? :)
Though, in real programming languages there generally are rules on what
an identifier can be, so most languages will allow a context separator.
 And even, most languages will have one, as part of the syntax to access
nested units, like "." and "->" in C, ".", "::" and "->" in C++, "::"
and "->" in PHP, "." in Python, etc.

So, as we discussed on IRC I suggest we pick an ASCII control character
(or sequence) and return this for languages that should allow anything
in tag names.


More information about the Devel mailing list