Comments (8)
Thanks for the bug report. I spotted the issue in the cpp Parse function and checked in the fix.
from taglisttoo.
Hi, Eric. Thanks for the quick fix! It's not giving the error anymore, but in .cc files it still does not seem to show nearly all of the tags and there are some other issues. Here they are:
Issue 1. For .c (and .cc) files, most tags are not shown in the window:
trivial.c | 1 #include <stdio.h>
| 2
macro | 3 void bar()
FOO | 4 {
~ | 5 }
~ | 6
~ | 7 int main(int argc, const char *argv[])
~ | 8 {
~ | 9 printf("hello world\n");
~ | 10 bar();
~ | 11 return 0;
~ | 12 }
~ | 13
~ | 14 #define FOO wtf
~ |~
~ |~
~ |~
~ |~
2 [TagList][-][taglist,unix]> 1 trivial.c[cpp,unix] 0x0 2,0-1 All
Issue 2: for a .h file, while most tags are called out, most class members are called out twice, once specified as class members and once not. See, in the below, there is quux and Trivial::quux both called out, but they are the same thing.
trivial.h | 1 class Trivial {
| 2 public:
Class2 : class | 3 Trivial();
prototypes | 4 int baz();
Class2::myFunc | 5
myFunc | 6 private:
| 7 void quux();
Trivial : class | 8 };
prototypes | 9
baz | 10 class Class2 {
quux | 11 public:
Trivial | 12 void myFunc();
Trivial::baz | 13 };
Trivial::quux |~
Trivial::Trivial |~
~ |~
~ |~
~ |~
2 [TagList][-][taglist,unix]> 3 trivial.h[cpp,unix] 0x3B 12,18 All
For reference, here is my ctags output for both files:
┌─[john@johnmac] - [/mnt/soporifix_vol3/user/home/john] - [2012-02-07 02:22:41]
└─[$] <> ctags -f - trivial.h
Class2 trivial.h /^class Class2 {$/;" c
Class2::myFunc trivial.h /^ void myFunc();$/;" p class:Class2 access:public signature:()
Trivial trivial.h /^ Trivial();$/;" p class:Trivial access:public signature:()
Trivial trivial.h /^class Trivial {$/;" c
Trivial::Trivial trivial.h /^ Trivial();$/;" p class:Trivial access:public signature:()
Trivial::baz trivial.h /^ int baz();$/;" p class:Trivial access:public signature:()
Trivial::quux trivial.h /^ void quux();$/;" p class:Trivial access:private signature:()
baz trivial.h /^ int baz();$/;" p class:Trivial access:public signature:()
myFunc trivial.h /^ void myFunc();$/;" p class:Class2 access:public signature:()
quux trivial.h /^ void quux();$/;" p class:Trivial access:private signature:()
┌─[john@johnmac] - [/mnt/soporifix_vol3/user/home/john] - [2012-02-07 02:22:46]
└─[$] <> ctags -f - trivial.c
FOO trivial.c /^#define FOO /;" d file:
bar trivial.c /^void bar()$/;" f
main trivial.c /^int main(int argc, const char *argv[])$/;" f signature:(int argc, const char *argv[])
Thanks so much for the great tool!
- John
On Tuesday, February 7, 2012 at 12:24 PM, Eric Van Dewoestine wrote:
Thanks for the bug report. I spotted the issue in the cpp Parse function and checked in the fix.
Reply to this email directly or view it on GitHub:
#2 (comment)
from taglisttoo.
So far I can't reproduce the issues so, using those same files, can you post the output of the following:
$ ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c --c-types=dgfsutv trivial.c
$ ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c++ --c++-types=cdgfnpsutv trivial.h
And lastly can you post your ctags version and os (looks like you're on a mac, which version?):
$ ctags --version
from taglisttoo.
┌─[john@johnmac] - [/home/john] - [2012-02-08 10:03:23]
└─[$] <> ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c --c-types=dgfsutv trivial.c
bar trivial.c /^void bar()$/;" f line:3
main trivial.c /^int main(int argc, const char *argv[])$/;" f line:7 signature:(int argc, const char *argv[])
FOO trivial.c /^#define FOO /;" d line:14
┌─[john@johnmac] - [/home/john] - [2012-02-08 10:03:25]
└─[$] <> ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c++ --c++-types=cdgfnpsutv trivial.h
Trivial trivial.h /^class Trivial {$/;" c line:1
Trivial trivial.h /^ Trivial();$/;" p line:3 class:Trivial signature:()
Trivial::Trivial trivial.h /^ Trivial();$/;" p line:3 class:Trivial signature:()
baz trivial.h /^ int baz();$/;" p line:4 class:Trivial signature:()
Trivial::baz trivial.h /^ int baz();$/;" p line:4 class:Trivial signature:()
quux trivial.h /^ void quux();$/;" p line:7 class:Trivial signature:()
Trivial::quux trivial.h /^ void quux();$/;" p line:7 class:Trivial signature:()
Class2 trivial.h /^class Class2 {$/;" c line:10
myFunc trivial.h /^ void myFunc();$/;" p line:12 class:Class2 signature:()
Class2::myFunc trivial.h /^ void myFunc();$/;" p line:12 class:Class2 signature:()
┌─[john@johnmac] - [/home/john] - [2012-02-08 10:03:30]
└─[$] <> ctags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: May 24 2011, 09:29:37
Addresses: [email protected], http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex
On Tuesday, February 7, 2012 at 11:19 PM, Eric Van Dewoestine wrote:
So far I can't reproduce the issues so, using those same files, can you post the output of the following:
$ ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c --c-types=dgfsutv trivial.c
$ ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c++ --c++-types=cdgfnpsutv trivial.hAnd lastly can you post your ctags version and os (looks like you're on a mac, which version?):
$ ctags --version
Reply to this email directly or view it on GitHub:
#2 (comment)
from taglisttoo.
The latest commit (296931d) should hopefully resolve the issue. It looks like you have some default options in a ~/.ctags, or some other supported file, which were resulting in modified ctags output.
from taglisttoo.
Awesome. That fixed those problems! There's one issue remaining that's getting me:
If I have a .cc file with multiple classes defined within it, only the class names show up in the tag list, not the individual functions:
example: With only definitions for Trivial member functions, this works:
trivial.cc | 1 #include "trivial.h"
| 2
Trivial : class | 3 Trivial::Trivial() {
function | 4 }
baz | 5
quux | 6 int Trivial::baz() {
Trivial | 7 return 0;
~ | 8 }
~ | 9
~ | 10 void Trivial::quux() {
~ | 11 }
~ | 12
~ | 13
~ |~
~ |~
~ |~
~ |~
~ |~
2 [TagList][-][taglist,unix]> 3 trivial.cc[cpp,unix] 0x23 1,1 All
As soon as I add a definition for the Class2 function, this fails:
trivial.cc | 1 #include "trivial.h"
| 2
Class2 : class | 3 Trivial::Trivial() {
| 4 }
Trivial : class | 5
~ | 6 int Trivial::baz() {
~ | 7 return 0;
~ | 8 }
~ | 9
~ | 10 void Trivial::quux() {
~ | 11 }
~ | 12
~ | 13 void Class2::myFunc() {
~ | 14 }
~ |~
~ |~
~ |~
~ |~
2 [TagList][-][taglist,unix]> 3 trivial.cc[cpp,unix] 0x7D 14,1 All
Here's the ctags output for the full file with both definitions:
ctags -f - --format=2 --excmd=pattern --fields=nks --sort=no --language-force=c++ --c++-types=cdgfnpsutv trivial.cc
Trivial trivial.cc /^Trivial::Trivial() {$/;" f line:3 class:Trivial signature:()
Trivial::Trivial trivial.cc /^Trivial::Trivial() {$/;" f line:3 class:Trivial signature:()
baz trivial.cc /^int Trivial::baz() {$/;" f line:6 class:Trivial signature:()
Trivial::baz trivial.cc /^int Trivial::baz() {$/;" f line:6 class:Trivial signature:()
quux trivial.cc /^void Trivial::quux() {$/;" f line:10 class:Trivial signature:()
Trivial::quux trivial.cc /^void Trivial::quux() {$/;" f line:10 class:Trivial signature:()
myFunc trivial.cc /^void Class2::myFunc() {$/;" f line:13 class:Class2 signature:()
Class2::myFunc trivial.cc /^void Class2::myFunc() {$/;" f line:13 class:Class2 signature:()
On Wednesday, February 8, 2012 at 10:40 AM, Eric Van Dewoestine wrote:
The latest commit (296931d) should hopefully resolve the issue. It looks like you have some default options in a ~/.ctags, or some other supported file, which were resulting in modified ctags output.
Reply to this email directly or view it on GitHub:
#2 (comment)
from taglisttoo.
Latest commit should resolve that issue as well. Thanks for the good bug reports!
from taglisttoo.
It works! Thanks so much. Now to start with the feature requests... ;-)
On Wednesday, February 8, 2012 at 9:38 PM, Eric Van Dewoestine wrote:
Latest commit should resolve that issue as well. Thanks for the good bug reports!
Reply to this email directly or view it on GitHub:
#2 (comment)
from taglisttoo.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from taglisttoo.