Submitter-Id: net
Originator: Stephan Wefing
Organization: none
Confidential: no
Synopsis: bugs in find-tag
Severity: non-critical
Priority: low
Category: auxiliary
Class: change-request
Release: gnats-3.101
Environment:
System: Linux kato 2.2.10-smp #8 SMP Fri Sep 17 16:45:09 CEST 1999 i686 unknown
Architecture: i686
Description:
(1) in contrast to emacs 20.3 the find-tag function
of xemacs 20.4 cannot
find tags associated with c/c++ struct/union/class members like
"stack_s::nof_objects". Such tags are generated by the gnu etags program
if the "--members" flag is set.
(2) in contrast to emacs 20.3 the find-tag function of xemacs 20.4 may fail
to find the definition of a type directly.
How-To-Repeat:
(1) consider the file "include.h" which
contains the following single line:
struct abc_s {int counter;};
calling the gnu etags program with
/usr/bin/X11/etags -C --members -S include.h
gives the following TAGS file:
^L
include.h,70
struct abc_s ^?abc_s^A1,0
struct abc_s {int counter;^?abc_s::counter^A1,0
(here i substituted each cntrl character by 2 ascii characters for transport
via email). passing "abc_s::counter" to the find-tag command gives the message
"No entries matching abc_s::counter".
(2) consider the file etags_test.h containing the single line
typdef struct {int i;} obj_t;
and a file etags_test.c containing the two following lines:
#include "etags_test.h"
typedef struct abs_s {obj_t o;} abs_t;
calling the gnu etags program with
/usr/bin/X11/etags -C --members -S etags_test.c etags_test.h
gives the following TAGS file:
^L
etags_test.c,83
typedef struct abs_s ^?abs_s^A2,24
typedef struct abs_s {obj_t o;} abs_t;^?abs_t^A2,24
^L
etags_test.h,41
typedef struct {int i;} obj_t;^?obj_t^A1,0
passing "obj_t" as a tag to xemacs' find-tag command positions the curser
first to the typdef statement in etags_test.c, whereas emacs first positions
to the correct typedef statement in etags_test.h. in both cases i use the same
TAGS file. i admit that this example is fairly artificial. however, the
problem may become really disturbing for real life code, especially if you use
other etags programs like that of darren hiebert
(
http://darren.hiebert.com/ctags/index.html). the problem is a consequence of
the fact that (x)emacs does not only scan the tag fields of a TAGS file but
also its context fields. it would be very useful if one could direct (x)emacs
to scan only the tag fields of a TAGS file.
Fix:
--=-=-=--