Re: Other languajes support

Ergus <[email protected]> Tue, 21 Feb 2023 00:35:00 +0100
Newsgroups gmane.comp.gnu.global.general
Message-ID <20230220233500.wz6lavaxmobxjfyb@Ergus>
Hi:

Thanks for replying. I have a couple of other questions.

On Mon, Feb 20, 2023 at 11:01:49AM +0900, Shigio YAMAGUCHI wrote:
>Hello,
>> After I implemented the gtags-mode for emacs, now I am forced to work
>> with C# on MS-Windows. Which adds two new levels of complexity to the
>> problem.
>>
>> 1) I know that, to use C#, I need to use the universal-ctags backend; but I
>> don't find any clear guide on how to do it, or even if it worth trying
>> for C#. For example, will gtags recognize the .cs extension
>> automatically or some extra option is needed?

This two step approach is a bit complicated for a common user (and the
aproach I want for the emacs package), so I will try to minimize the
number of steps to simplify things in the gtags-mode package.

I also try to avid using environment variables because in Emacs+Tramp
the remote environment variables are a bit tricky and may become
problematic to handle. SO let's make this the plan C.

1) Is possible to do everything in a single step with the command line?
I don't care if the command becomes long.

I tried the --gtagslabel=universal-ctags

But there is some problem with this option. Somehow it is not working
for me... when I use the --explain it still shows the built-in ones

3) Isn't gtags capable to find the ctags executable in my path? it is
not in /usr/local/bin/ctags, but it is in the PATH... so only ctags
works for me.

3.1) Is there something similar for ctagscom but from command line?


Best regards, and thanks again,
Ergus

>
>Yes, gtags recognizes the .cs extension.
>Please try this:
>
>1. Copy the config file and change it to match your environment.
>
>[in your project]
>$ cp /usr/local/share/gtags/gtags.conf .
>$ vi gtags.conf
>...
>universal-ctags|setting to use Universal Ctags plug-in parser:\
>...
>ctagscom=/usr/local/bin/ctags:\ <===== change the path of ctags
>
>2. Execute gtags
>
>$ export GTAGSLABEL=universal-ctags <===== use Universal ctags
>$ gtags
>
>To make sure it's working properly, please use --explain option.
>
>$ gtags --explain
>...
>- File 'global/global.c' is handled as follows:
>suffix:   |.c|
>language: |C|
>parser:   |parser|
>library:  |/usr/local/lib/gtags/universal-ctags.la| <=== universal
>ctags is used.
>...
>$ _
>> 2) On the other hand, MS-Windows is not POSIX and gtags page specifies
>> POSIX somewhere, but I saw that there is a gtags/global package in msys,
>> So, the obvious question: Any previous experience of gtags working on
>> ms-windows outside cygwin?
>>
>> The main goal is to make it work in a native MS-windows emacs, not in a
>> cygwing controlled environment. And then make it work for C# with
>> univ-ctags.
>
>Sorry,I don't know about MS-Windows.
>
>Regards,
>Shigio
>
>On Sun, Feb 19, 2023 at 6:29 PM Ergus <[email protected]> wrote:
>>
>> Hi:
>>
>> After I implemented the gtags-mode for emacs, now I am forced to work
>> with C# on MS-Windows. Which adds two new levels of complexity to the
>> problem.
>>
>> 1) I know that, to use C#, I need to use the universal-ctags backend; but I
>> don't find any clear guide on how to do it, or even if it worth trying
>> for C#. For example, will gtags recognize the .cs extension
>> automatically or some extra option is needed?
>>
>> 2) On the other hand, MS-Windows is not POSIX and gtags page specifies
>> POSIX somewhere, but I saw that there is a gtags/global package in msys,
>> So, the obvious question: Any previous experience of gtags working on
>> ms-windows outside cygwin?
>>
>> The main goal is to make it work in a native MS-windows emacs, not in a
>> cygwing controlled environment. And then make it work for C# with
>> univ-ctags.
>>
>> Thanks in advance for any help,
>> Ergus
>>
>>
>>
>>
>
>
>-- 
>Shigio YAMAGUCHI <[email protected]>
>PGP fingerprint:
>26F6 31B4 3D62 4A92 7E6F  1C33 969C 3BE3 89DD A6EB