From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Esben Stien Newsgroups: gmane.emacs.help Subject: How can I get C# tags to work? Date: Wed, 04 Sep 2024 15:08:31 +0200 Message-ID: <875xrb7ei8.fsf@esben-stien.name> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6500"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 04 15:09:20 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1slplA-0001Xl-98 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Sep 2024 15:09:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slpkc-0003jO-6L; Wed, 04 Sep 2024 09:08:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slpkZ-0003dU-Ij for help-gnu-emacs@gnu.org; Wed, 04 Sep 2024 09:08:44 -0400 Original-Received: from smtp5.emailarray.com ([65.39.216.39]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slpkX-0001Df-3s for help-gnu-emacs@gnu.org; Wed, 04 Sep 2024 09:08:43 -0400 Original-Received: (qmail 87262 invoked by uid 89); 4 Sep 2024 13:08:33 -0000 X-Orig-Sender: b0ef@esben-stien.name Original-Received: from unknown (HELO quasar) (YjBlZkBlc2Jlbi1zdGllbi5uYW1lQDg1LjE2Ni42OS4xODk=) (POLARISLOCAL) by smtp5.emailarray.com with ESMTPS (TLS_AES_256_GCM_SHA384 encrypted); 4 Sep 2024 13:08:33 -0000 Received-SPF: none client-ip=65.39.216.39; envelope-from=b0ef@esben-stien.name; helo=smtp5.emailarray.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:147901 Archived-At: I'm trying to get C# tags to work and I'm not getting anything to work, so I have to start from the beginning;) I have Universal Ctags installed as u-ctags ``` $ u-ctags --version Universal Ctags 6.1.0, Copyright (C) 2015-2023 Universal Ctags Team Universal Ctags is derived from Exuberant Ctags. Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert URL: https://ctags.io/ Output version: 0.0 Optional compiled features: +wildcards, +regex, +iconv, +option-directory, +xpath, +json, +interactive, +sandbox, +yaml, +packcc, +optscript, +pcre2 ``` I have C# source files. Program.cs ``` namespace Common.Services { public class Tester { public static void Main() { IBar Bar = new Bar(); Bar.Hukarz(); } } } ``` IBar.cs ``` using System; using System.Collections.Generic; namespace Common.Services { interface IBar { public void Hukarz(); } } ``` Bar.cs ``` namespace Common.Services { public class Bar : IBar { public void Hukarz() { System.Console.WriteLine("ehlo"); } } } ``` I create the tags file, as such ``` u-ctags -R ``` The tags file looks like this. ``` !_TAG_EXTRA_DESCRIPTION anonymous /Include tags for non-named objects like lambda/ !_TAG_EXTRA_DESCRIPTION fileScope /Include tags of file scope/ !_TAG_EXTRA_DESCRIPTION pseudo /Include pseudo tags/ !_TAG_EXTRA_DESCRIPTION subparser /Include tags generated by subparsers/ !_TAG_FIELD_DESCRIPTION epoch /the last modified time of the input file (only for F\/file kind tag)/ !_TAG_FIELD_DESCRIPTION file /File-restricted scoping/ !_TAG_FIELD_DESCRIPTION input /input file/ !_TAG_FIELD_DESCRIPTION name /tag name/ !_TAG_FIELD_DESCRIPTION pattern /pattern/ !_TAG_FIELD_DESCRIPTION typeref /Type and name of a variable or typedef/ !_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ !_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ !_TAG_KIND_DESCRIPTION!C# E,event /events/ !_TAG_KIND_DESCRIPTION!C# c,class /classes/ !_TAG_KIND_DESCRIPTION!C# d,macro /macro definitions/ !_TAG_KIND_DESCRIPTION!C# e,enumerator /enumerators (values inside an enumeration)/ !_TAG_KIND_DESCRIPTION!C# f,field /fields/ !_TAG_KIND_DESCRIPTION!C# g,enum /enumeration names/ !_TAG_KIND_DESCRIPTION!C# i,interface /interfaces/ !_TAG_KIND_DESCRIPTION!C# m,method /methods/ !_TAG_KIND_DESCRIPTION!C# n,namespace /namespaces/ !_TAG_KIND_DESCRIPTION!C# p,property /properties/ !_TAG_KIND_DESCRIPTION!C# s,struct /structure names/ !_TAG_KIND_DESCRIPTION!C# t,typedef /typedefs/ !_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/ !_TAG_OUTPUT_FILESEP slash /slash or backslash/ !_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/ !_TAG_OUTPUT_VERSION 0.0 /current.age/ !_TAG_PARSER_VERSION!C# 0.0 /current.age/ !_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/ !_TAG_PROC_CWD /home/b0ef/proj/2024-08-12.debug-csharp-interface-tags/ // !_TAG_PROGRAM_AUTHOR Universal Ctags Team // !_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/ !_TAG_PROGRAM_URL https://ctags.io/ /official site/ !_TAG_PROGRAM_VERSION 6.1.0 // Bar Bar.cs /^ public class Bar : IBar$/;" c namespace:Common.Services Common.Services Bar.cs /^namespace Common.Services$/;" n Common.Services IBar.cs /^namespace Common.Services$/;" n Common.Services Program.cs /^namespace Common.Services$/;" n Hukarz Bar.cs /^ public void Hukarz()$/;" m class:Common.Services.Bar Hukarz IBar.cs /^ public void Hukarz();$/;" m interface:Common.Services.IBar IBar IBar.cs /^ interface IBar$/;" i namespace:Common.Services Main Program.cs /^ public static void Main()$/;" m class:Common.Services.Tester Tester Program.cs /^ public class Tester$/;" c namespace:Common.Services ``` If I now convert this to GNU Global, as such ``` gtags --gtagslabel=ctags -f tags ``` , which outputs: ``` Warning: '!_TAG_EXTRA_DESCRIPTIONanonymous /Include tags for non-named objects like lambda/' not found. ignored. Warning: '!_TAG_EXTRA_DESCRIPTIONfileScope /Include tags of file scope/' not found. ignored. Warning: '!_TAG_EXTRA_DESCRIPTIONpseudo /Include pseudo tags/' not found. ignored. Warning: '!_TAG_EXTRA_DESCRIPTIONsubparser /Include tags generated by subparsers/' not found. ignored. Warning: '!_TAG_FIELD_DESCRIPTIONepoch /the last modified time of the input file (only for F\/file kind tag)/' not found. ignored. Warning: '!_TAG_FIELD_DESCRIPTIONfile /File-restricted scoping/' not found. ignored. Warning: '!_TAG_FIELD_DESCRIPTIONinput /input file/' not found. ignored. Warning: '!_TAG_FIELD_DESCRIPTIONname /tag name/' not found. ignored. Warning: '!_TAG_FIELD_DESCRIPTIONpattern /pattern/' not found. ignored. Warning: '!_TAG_FIELD_DESCRIPTIONtyperef /Type and name of a variable or typedef/' not found. ignored. Warning: '!_TAG_FILE_FORMAT 2/extended format; --format=1 will not append ;" to lines/' not found. ignored. Warning: '!_TAG_FILE_SORTED 1/0=unsorted, 1=sorted, 2=foldcase/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# E,event /events/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# c,class /classes/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# d,macro /macro definitions/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# e,enumerator /enumerators (values inside an enumeration)/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# f,field /fields/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# g,enum /enumeration names/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# i,interface /interfaces/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# m,method /methods/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# n,namespace /namespaces/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# p,property /properties/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# s,struct /structure names/' not found. ignored. Warning: '!_TAG_KIND_DESCRIPTION!C# t,typedef /typedefs/' not found. ignored. Warning: '!_TAG_OUTPUT_EXCMD mixed /number, pattern, mixed, or combineV2/' not found. ignored. Warning: '!_TAG_OUTPUT_FILESEP slash /slash or backslash/' not found. ignored. Warning: '!_TAG_OUTPUT_MODE u-ctags /u-ctags or e-ctags/' not found. ignored. Warning: '!_TAG_OUTPUT_VERSION 0.0 /current.age/' not found. ignored. Warning: '!_TAG_PARSER_VERSION!C#0.0 /current.age/' not found. ignored. Warning: '!_TAG_PATTERN_LENGTH_LIMIT 96 /0 for no limit/' not found. ignored. Warning: '!_TAG_PROC_CWD /home/b0ef/proj/2024-08-12.debug-csharp-interface-tags/ //' not found. ignored. Warning: '!_TAG_PROGRAM_AUTHOR Universal Ctags Team //' not found. ignored. Warning: '!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/' not found. ignored. Warning: '!_TAG_PROGRAM_URL https://ctags.io/ /official site/' not found. ignored. Warning: '!_TAG_PROGRAM_VERSION 6.1.0 //' not found. ignored. Warning: 'Bar Bar.cs /^ public class Bar : IBar$/;" c namespace:Common.Services' not found. ignored. Warning: 'Common.Services Bar.cs /^namespace Common.Services$/;" n' not found. ignored. Warning: 'Common.Services IBar.cs /^namespace Common.Services$/;" n' not found. ignored. Warning: 'Common.Services Program.cs /^namespace Common.Services$/;" n' not found. ignored. Warning: 'Hukarz Bar.cs /^ public void Hukarz()$/;" mclass:Common.Services.Bar' not found. ignored. Warning: 'Hukarz IBar.cs /^ public void Hukarz();$/;"m interface:Common.Services.IBar' not found. ignored. Warning: 'IBar IBar.cs /^ interface IBar$/;" i namespace:Common.Services' not found. ignored. Warning: 'Main Program.cs /^ public static void Main()$/;"m class:Common.Services.Tester' not found. ignored. Warning: 'Tester Program.cs /^ public class Tester$/;" cnamespace:Common.Services' not found. ignored. ``` The resulting three G* files don't contain any symbols. Any pointers as to what's happening here?;) -- Esben Stien is b0ef@e s a http://www. s t n m irc://irc. b - i . e/%23contact sip:b0ef@ e e jid:b0ef@ n n