Thread: [Ctags] ctags 5.7 does not behave like before
Brought to you by:
dhiebert
From: Bahadir B. <bah...@gm...> - 2007-12-26 00:49:26
|
Hi, I regularly use ctags in the following way: ctags --recurse --languages=C,Asm -Ltagfilelist where tagfilelist has a list of files that I want the tags to be generated for. Now, this *used to* generate tags for the C header files i.e. with the extension '.h'. Now it doesn't do that on 5.7, I get just the C and Asm files. If I use no --language option, this time the headers are covered for, but I dont get the ASM files in that case. I don't know what version of exuberant ctags I had on my previous PC, (can discover tomorrow) but probably not older than 5.6. How should I run it to get the older behaviour? Thanks, Bahadir |
From: Bahadir B. <bah...@gm...> - 2007-12-26 00:57:57
|
On Dec 26, 2007 12:49 AM, Bahadir Balban <bah...@gm...> wrote: > > ctags --recurse --languages=C,Asm -Ltagfilelist > > where tagfilelist has a list of files that I want the tags to be > generated for. Now, this *used to* generate tags for the C header > files i.e. with the extension '.h'. Now it doesn't do that on 5.7, I > get just the C and Asm files. > > Thanks, > Bahadir > I just realise now by using --languages=Asm or not using it at all, I dont get any Asm files tagged either. So Asm feature doesn't work. I have ARM assembler files with GNU as syntax. I will try to install 5.6 now to confirm it works. Thanks, Bahadir |
From: Bahadir B. <bah...@gm...> - 2007-12-26 01:21:58
|
On Dec 26, 2007 12:57 AM, Bahadir Balban <bah...@gm...> wrote: > On Dec 26, 2007 12:49 AM, Bahadir Balban <bah...@gm...> wrote: > > > > ctags --recurse --languages=C,Asm -Ltagfilelist > > > > where tagfilelist has a list of files that I want the tags to be > > generated for. Now, this *used to* generate tags for the C header > > files i.e. with the extension '.h'. Now it doesn't do that on 5.7, I > > get just the C and Asm files. > > > > Thanks, > > Bahadir > > > > I just realise now by using --languages=Asm or not using it at all, I > dont get any Asm files tagged either. So Asm feature doesn't work. I > have ARM assembler files with GNU as syntax. > > I will try to install 5.6 now to confirm it works. > > Thanks, > Bahadir > Sorry to email 3 times on the same subject, but I checked and it doesn't seem to be a version issue because I tried all versions down to 5.5.4. Asm files work ok, it just misled me because it didn't tag one particular. But the header issue is still there, I start to believe this is not because of the ctags version but the way ubuntu builds the ctags package. With --verbose and --languages=C,Asm I get: ignoring ./include/tests/uart.h (language disabled) ... and Setting option defaults Setting default header extensions: h, H, hh, hpp, hxx, h++, inc, def Installing default language mappings: C: .c C++: .c++ .cc .cp .cpp .cxx .h .h++ .hh .hp .hpp .hxx .C .H If I add c++ to --languages it works OK. But I never had to add c++ before. Thanks, Bahadir |
From: Elliott H. <en...@je...> - 2007-12-26 01:45:10
|
On 2007-12-25, at 17:21 , Bahadir Balban wrote: > Sorry to email 3 times on the same subject, but I checked and it > doesn't seem to be a version issue because I tried all versions down > to 5.5.4. Asm files work ok, it just misled me because it didn't tag > one particular. But the header issue is still there, I start to > believe this is not because of the ctags version but the way ubuntu > builds the ctags package. With --verbose and --languages=C,Asm I get: > > ignoring ./include/tests/uart.h (language disabled) > ... > > and > > Setting option defaults > Setting default header extensions: h, H, hh, hpp, hxx, h++, inc, > def > Installing default language mappings: > > C: .c > C++: .c++ .cc .cp .cpp .cxx .h .h++ .hh .hp .hpp .hxx .C .H that's the same output and behavior you'd get if you built your own Ctags from source. and it's the same output and behavior you'd have seen with older versions too, at least as Darren released them... > If I add c++ to --languages it works OK. But I never had to add c++ > before. ... though it could be that whoever built your last Ctags binary added ".h" to the C extensions. (the reason why the released version doesn't do that is that you can't distinguish a C .h from a C++ .h and since C+ + is mostly a superset, it's more useful to have Ctags assume .h means C++ than C.) if you want to hack your own Ctags, add "h" to the extensions array on line 2849 of "c.c" as it stands today. but it's probably easier (and more future-proof) to just start saying --language=Asm,C++ instead. --elliott |