[comp.soft-sys.andrew] tags inset

tobeye@NORTHSTAR.DARTMOUTH.EDU (Anthony Edwards) (03/15/90)

I am using EZ with ctext and tags.  I'm really glad EZ has the tags
feature - it is a very useful feature in an editor.  However, the tags
stuff is not implemented completely right:  when I do a Find Tag, it
finds the wrong tag.

A tags file generated by ctags(1) is composed of three fields per line: 
the routine name, the file name, and the search string.  Most search
strings start with /^ to match the search string flush left.  (They also
typically have $/ at the end to force a match flush right as well, but
I'm not worried about that right now.)  EZ ignores this!  EZ is matching
on the first string that is identical.  Imagine this fictitious C file:

/*  myfile.c - a fictitious C file */

/* routines in this file:
	main (int argc, char ** argv)
	foo (int x)
*/

main (int argc, char ** argv)
{
   foo (argc);
}

foo (int x)
{
   printf ("%d\n", x);
}

Now, if you do a Goto Tag on foo, the cursor will be positioned at the
top of the file in the comment for foo, not on the actual foo routine. 
This is because the tags inset is not performing the match flush left. 
It just performs a Search Forward.

If you want another minor nuance of tags, here it is:

o  The subroutine name is not case sensative.  If I have the routines
Foo(), FOO(), and foo(), only one of them can be found by the tags inset.

   - Anthony Edwards

tobeye@NORTHSTAR.DARTMOUTH.EDU (Anthony Edwards) (10/30/90)

[ excuse me if I posted this before (15-Mar-1990).  I just discovered it
in my old mail folder and it looked as though the message was never
delivered. ]

I am using EZ with ctext and tags.  I'm really glad EZ has the tags
feature - it is a very useful feature in an editor.  However, the tags
stuff is not implemented completely right:  when I do a Find Tag, it
finds the wrong tag.

A tags file generated by ctags(1) is composed of three fields per line: 
the routine name, the file name, and the search string.  Most search
strings start with /^ to match the search string flush left.  (They also
typically have $/ at the end to force a match flush right as well, but
I'm not worried about that right now.)  EZ ignores this!  EZ is matching
on the first string that is identical.  Imagine this fictitious C file:

/*  myfile.c - a fictitious C file */

/* routines in this file:
	main (int argc, char ** argv)
	foo (int x)
*/

main (int argc, char ** argv)
{
   foo (argc);
}

foo (int x)