Discussion:
[ nedit-Bugs-3019409 ] ctags is not matched on strings with backslashes
SourceForge.net
2010-06-22 06:02:30 UTC
Permalink
Bugs item #3019409, was opened at 2010-06-22 15:02
Message generated for change (Tracker Item Submitted) made by enerjazzer
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=3019409&group_id=11005

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Maxim Yanchenko (enerjazzer)
Assigned to: Nobody/Anonymous (nobody)
Summary: ctags is not matched on strings with backslashes

Initial Comment:
Suppose I have a function with a comment after the name, containing a backslash, like this:
void f() /// \todo rewrite
exuberant tags converts backslashes to double backslashes, so in the tags file it becomes
f file /^void f() \/\/\/ \\todo rewrite$/;" f

When I try to find this in NEdit, I receive the following error: "Definition for f not found in <file>"

This is because NEdit in the function fakeRegExSearch changes the regexp and adds additional backslashes so the regexp finally contains \\\\todo, that of course can't be found.
The fix is to change the line
} else if(strchr("()-[]<>{}.|^*+?&\\", *inPtr)
to
} else if(strchr("()-[]<>{}.|^*+?&", *inPtr)



----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=3019409&group_id=11005
Tony Balinski
2010-06-22 21:46:51 UTC
Permalink
Post by SourceForge.net
Bugs item #3019409, was opened at 2010-06-22 15:02
Message generated for change (Tracker Item Submitted) made by enerjazzer
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=3019409&group_id=11005
Post by SourceForge.net
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Maxim Yanchenko (enerjazzer)
Assigned to: Nobody/Anonymous (nobody)
Summary: ctags is not matched on strings with backslashes
void f() /// \todo rewrite
exuberant tags converts backslashes to double backslashes, so in the tags file it becomes
f file /^void f() \/\/\/ \\todo rewrite$/;" f
"Definition for f not found in <file>"
This is because NEdit in the function fakeRegExSearch changes the regexp
and adds additional backslashes so the regexp finally contains \\\\todo,
that of course can't be found.
The fix is to change the line
} else if(strchr("()-[]<>{}.|^*+?&\\", *inPtr)
to
} else if(strchr("()-[]<>{}.|^*+?&", *inPtr)
Sounds familiar... I had done exactly the same. Actually, as part of my
tinkering I overhauled the tags system, in particular to allow for proper
management of scoped names in C++ and Java - as provided bu Exuberant Ctags;
adding progress indications for large tag files (I use a 130MB one at work),
allowing for a decompression filter to be called (since that tags file is so
big!), and rendering the tag duplicates dialog entries as "columns" (actually
just adjusted with spaces, but as close to the right number needed for the
text, in the font used, to be rendered correctly). On the strength of that I
added formatting and multiple fonts to calltips too.
If anyone's interested, the current state is here:
http://ajbj.free.fr/nedit/neditHome/neditWork-2010-06-16.tar.bz2 - which is
now rather distant from current CVS. A picture of the dialog can be found
here:
Loading Image...
- other pictures in the same directory.

Tony
--
NEdit Develop mailing list - Develop-***@public.gmane.org
http://www.nedit.org/mailman/listinfo/develop
Loading...