#97 Wrong Regex match for tag?!

closed-postponed
nobody
Program (402)
3
2001-12-24
2001-11-27
No

The attached files show a problem with NEdit and a
ctags file. If the function header includes a \n
character the matching doesn't seem to work.

Discussion

  • Alexander Mai

    Alexander Mai - 2001-11-27

    Sample C source code

     
  • Alexander Mai

    Alexander Mai - 2001-11-27

    Logged In: YES
    user_id=15180

    For completness here's that tags files as created by
    exuberant ctags 5.x
    BTW, I'm not sure whether this is the old, known problem
    with tags matching or another one ...

     
  • Markus Schwarzenberg

    Logged In: YES
    user_id=81393

    Where is your tags file ?
    (Or what are your options to the ctags call?)
    BTW, if I generate it myself (simply: ctags sample.c)
    it generates the search line (in tags)

    foo sample.c /^void foo(int useless,$/;" f

    which means nedit searches (correctly) the first ocurrance
    of the RE "^void foo(int useless,$" - which is done
    correctly (here) but of course finds the prototype of foo()
    rather than the function itself in the example.
    The generation of this ambiguous expression is ctags
    problem, not NEdits. It doesn't include the newline in the
    search expression (by now I don't know of any tags file
    containing newline specs in the search expression).
    I'm not a ctags command line options expert, perhaps it has
    some switch to automatically change the search direction for
    such cases.

     
  • Alexander Mai

    Alexander Mai - 2001-11-27

    ctags file for sample.c

     
  • Alexander Mai

    Alexander Mai - 2001-11-27

    Logged In: YES
    user_id=15180

    I'm using exuberant ctags 5.1, just
    "ctags sample.c"
    and no .ctagsrc.

    But seems you are right. I talked about this problem to the
    exuberant ctags author, but I sent him a "wrong" example. In
    turn he said my editor was buggy and I opened up this
    report. Now I'm contacting him again with the correct example.
    This problem remains, but it may not have a solution within
    NEdit so far ...

     
  • Alexander Mai

    Alexander Mai - 2001-11-27
    • priority: 4 --> 3
     
  • Alexander Mai

    Alexander Mai - 2001-12-07
    • status: open --> open-postponed
     
  • Alexander Mai

    Alexander Mai - 2001-12-07

    Logged In: YES
    user_id=15180

    ctags can't handle this case as has been confirmed now.
    Markus S. suggested to use an alternative mode of ctags
    which could provide regex+line numbers.

     
  • Markus Schwarzenberg

    Logged In: YES
    user_id=81393

    BTW, I'm already working on a patch which makes NEdit
    adittionally accept these etags TAGS files (basing on search
    string.+line num).

     
  • Alexander Mai

    Alexander Mai - 2001-12-24

    Logged In: YES
    user_id=15180

    The fix by M. Schwarzenberg is meanwhile in
    CVS. Since it wasn't a "bug" in NEdit we
    close this for now.

     
  • Alexander Mai

    Alexander Mai - 2001-12-24
    • status: open-postponed --> closed-postponed
     

Log in to post a comment.