Opened 10 years ago

Last modified 7 years ago

#45500 assigned defect

ctags 5.8_1 ignores --regex- flags

Reported by: mvgrimes Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port: ctags

Description

ctags can be extended for additional language features with the --regex-<lang> flag. These appear to be ignored in the macports version of ctags. I believe ctags is compiled with the correct flags (+regex), so I'm not sure why this is happening.

As an example, I get this on a linux box:

[@linux]• cat test.js
var x = {
  test = function(){
  }
};
[@linux]• ctags --options=NONE --regex-javascript='/(\w+)\s*=\s*function/\1/f,function/' test.js
No options will be read from files or environment
[@linux]• cat tags
!_TAG_FILE_FORMAT       2       /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED       1       /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME      Exuberant Ctags //
!_TAG_PROGRAM_URL       http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.8     //
test    test.js /^  test = function(){$/;"  f
[@linux]• ctags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Jul  4 2014, 04:03:31
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex, +internal-sort

Notice the "test test.js ..." line in the tags file. And this on my Mac:

[~]• ctags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Nov 26 2012, 23:11:20
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex
[~]• cat test.js
var x = {
  test = function(){
  }
};
[~]• /opt/local/bin/ctags --options=NONE --regex-javascript='/(\w+)\s*=\s*function/\1/f,function/' test.js
No options will be read from files or environment
[~]• cat tags
!_TAG_FILE_FORMAT       2       /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED       1       /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR    Darren Hiebert  /dhiebert@users.sourceforge.net/
!_TAG_PROGRAM_NAME      Exuberant Ctags //
!_TAG_PROGRAM_URL       http://ctags.sourceforge.net    /official site/
!_TAG_PROGRAM_VERSION   5.8     //
[~]• /opt/local/bin/ctags --version
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
  Compiled: Nov 26 2012, 23:11:20
  Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
  Optional compiled features: +wildcards, +regex

I don't believe the +internal-sort flag should impact this. I wonder if this has to do with the regex library that ctags is compiled with?

Thanks

Change History (2)

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Cc: mww@… removed
Owner: changed from macports-tickets@… to mww@…

comment:2 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from mww@… to macports-tickets@…
Status: newassigned
Note: See TracTickets for help on using tickets.