Hi,
I have fixed the bug by removing duplicated suffixes from the langmap.
The repository is updated.

$ cat gtags.conf
default:langmap=c\:.c,cpp\:.c:
$ gtags -w
Warning: langmap: suffix 'c' is duplicated. all except for the head is
ignored.
$ _

Regards
Shigio


2015-08-28 21:31 GMT+09:00 Marcus Harnisch <[email protected]>:

> You are correct, --language-force doesn't help at all in filter mode. I
> should have known better since I was looking at strace output when
> debugging this. The general issue seems to be that different parsers may
> behave differently in this respect. Ultimately the parser should obey what
> it was told by gtags, so trimming the list would perhaps be the best option.
>
> Thanks
> Marcus
>
> On Fri, Aug 28, 2015 at 2:06 PM, Shigio YAMAGUCHI <[email protected]> wrote:
>
>> Hi,
>> > Ctags processes the list in the way "last wins".
>>
>> You are right. I didn't notice it at all.
>>
>> > Not knowing anything about the gtags internals or the ctags parser in
>> particular,
>> > I'd suggest that gtags invokes ctags with the option "--language-force",
>> > passing as an argument the language that gtags thought was the correct
>> one.
>>
>> Exuberant-ctags plug-in parser invokes ctags using filter mode (--filter).
>> Is the --language-force available in filter mode?
>> Otherwise, we may have to trim the langmap string itself before passing
>> it to ctags.
>>
>> Anyway, I will put this into the BUGS list.
>> Thank you.
>>
>> Regards
>> Shigio
>>
>>
>> 2015-08-28 17:34 GMT+09:00 Marcus Harnisch <[email protected]>:
>>
>>>
>>>    - What was occurred? (as is)
>>>
>>> A custom label inherits from "exuberant-ctags", i.e. gets all its
>>> langmap definitions. One is supposed to be replaced without modifying the
>>> "exuberant-ctags" label.
>>> Apparently, gtags processes the langmap in the way "first wins", as I
>>> have to specify the replacement mapping before including the parent. This
>>> list is then passed to the ctags parser in the same order. Ctags processes
>>> the list in the way "last wins".
>>> As a result, gtags --explain tells me the expected langmap result.
>>> Ctags, however, which uses the original langmap, doesn't find any tags in
>>> the file.
>>>
>>>    - What did you expect from it?
>>>
>>> Not knowing anything about the gtags internals or the ctags parser in
>>> particular, I'd suggest that gtags invokes ctags with the option
>>> "--language-force", passing as an argument the language that gtags thought
>>> was the correct one.
>>>
>>> Thanks
>>> Marcus
>>>
>>> _______________________________________________
>>> Bug-global mailing list
>>> [email protected]
>>> https://lists.gnu.org/mailman/listinfo/bug-global
>>>
>>>
>>
>>
>> --
>> Shigio YAMAGUCHI <[email protected]>
>> PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
>>
>
>


-- 
Shigio YAMAGUCHI <[email protected]>
PGP fingerprint: D1CB 0B89 B346 4AB6 5663  C4B6 3CA5 BBB3 57BE DDA3
_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global

Reply via email to