[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: regular expression in find-tag-regexp
From: |
Shiyuan |
Subject: |
Re: regular expression in find-tag-regexp |
Date: |
Sat, 1 Oct 2011 11:03:38 -0500 |
>>> >> If I use the Mat.*GetArray.* to search, find-tag-regexp will only match
>>> >> MatGetArray_SeqAIJ but isearch-forward-regexp will match all except the
>>> >> lower case matgetarray(). If I use the MatGetArray, find-tag-regexp will
>>> >> match all of them including the matgetarray()? Anyone can explain why it
>> is
>> >> so? If I want find-tag-regexp to find all of them( with or without the
>> >> matgetarray()), what regexp should I use? Thank you.
>>>
>>
>> If I use re-search-forward to search the regexp Mat.*GetArray.* on the
>> buffer visitng the TAGS file, it can also locate all the lines above. So
>> find-tag-regexp with the exact same regexp only gives me one match?
>I think there's a possible misunderstanding here. Did you use
>C-M-. once and expected it to find all of these matches? If so, your
>expectations are incorrect. Here's what the manual says about this
>command:
> The command `C-M-.' (`find-tag-regexp') visits the tags that match a
>specified regular _expression_. It is just like `M-.' except that it
>does regexp matching instead of substring matching.
>"It is just like `M-.'". And the description of M-. says:
>To find other tags that match the same substring, give `find-tag' a
>numeric argument, as in `C-u M-.'; this does not read a tag name, but
>continues searching the tags table's text for another tag containing
>the same substring last used.
>Therefore, the first time you use C-M-., it finds only the first
>match. To find each of the other matches, use "C-u C-M-." time and
>again, until you find the match you want.
>Does this resolve the problem?Thanks for clarifying. But I was aware of this and I did use C-u C-M-. to find next match So
I think there is something wrong with the TAGS file.
>The line number where the tag is in its file and the character number
>of the first character of that line.
The first is line number. But the second number is very large, some are tens of thousands, but the source file don't have such a long line. I still want to find out what's going wrong in the TAGS file, so it would be helpful if I know better about TAGS files. Also there are some unprintable characters in TAGS. I remember there is a mode which can show the Octal/Hex code for all characters but I forget how to invoke this. Thanks.