From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shiyuan Newsgroups: gmane.emacs.help Subject: Re: regular expression in find-tag-regexp Date: Sat, 1 Oct 2011 11:03:38 -0500 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51dd7d98be23904ae3ee254 X-Trace: dough.gmane.org 1317485037 8080 80.91.229.12 (1 Oct 2011 16:03:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2011 16:03:57 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 01 18:03:50 2011 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RA22X-0007d1-DW for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Oct 2011 18:03:49 +0200 Original-Received: from localhost ([::1]:50953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RA22V-0005L5-Vw for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Oct 2011 12:03:47 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:37804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RA22Q-0005Kn-Mc for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 12:03:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RA22P-0002hB-IS for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 12:03:42 -0400 Original-Received: from mail-yx0-f169.google.com ([209.85.213.169]:39253) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RA22O-0002f3-2A; Sat, 01 Oct 2011 12:03:40 -0400 Original-Received: by yxi19 with SMTP id 19so2916476yxi.0 for ; Sat, 01 Oct 2011 09:03:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=GzNDBTLM4fxUKiVfhIIWENYhnPYfb5lHVfFkHNYouFA=; b=TQgZ4XYNzQuW77Y5zEif9n8PV8RZylzVYqg2Bj3NqFdsP70trBXON67yXlb/Gdm231 qqyPCjEFvrzhW1lQ/AX4kcYV2cbaF8rYUx9Fcc8Y49O0/+b3VToEeFd4d7+sp+TvQ+vz mYYROY4xxHA03xZuZXMdqmY7t4RoF5cY+N5c0= Original-Received: by 10.68.32.133 with SMTP id j5mr67509889pbi.68.1317485018866; Sat, 01 Oct 2011 09:03:38 -0700 (PDT) Original-Received: by 10.142.68.6 with HTTP; Sat, 1 Oct 2011 09:03:38 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.213.169 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:82395 Archived-At: --bcaec51dd7d98be23904ae3ee254 Content-Type: text/plain; charset=ISO-8859-1 >>> >> 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. --bcaec51dd7d98be23904ae3ee254 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

>>>= ; >> If I use the Mat.*GetArray.* to search, find-tag-regexp will onl= y match
>>> >> MatGetArray_SeqAIJ but isearch-forward-regexp will ma= tch all except the
>>> >> lower case matgetarray(). If I = use the MatGetArray, find-tag-regexp will
>>> >> match al= l 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 rege= xp 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 abo= ve. So
>> find-tag-regexp with the exact same regexp only gives me= one match?

>I think there's a possible misunderstanding here= . =A0Did you use
>C-M-. once and expected it to find all of these matches? =A0If so, your=
>expectations are incorrect. =A0Here's what the manual says abou= t this
>command:


=A0 =A0> The command `C-M-.' (`fin= d-tag-regexp') visits the tags that match a
=A0>specified regular expression. =A0It is just like `M-.' except th= at it
=A0>does regexp matching instead of substring matching.

= >"It is just like `M-.'". =A0And the description of M-. sa= ys:

=A0>To find other tags that match the same substring, give `find-tag= ' a
=A0>numeric argument, as in `C-u M-.'; this does not read= a tag name, but
=A0>continues searching the tags table's text fo= r another tag containing
=A0>the same substring last used.

>Therefore, the first time y= ou use C-M-., it finds only the first
>match. =A0To find each of the = other matches, use "C-u C-M-." time and
>again, until you f= ind the match you want.

>Does this resolve the problem?
Thanks for clarifying. But I was aware of th= is and I did use C-u C-M-. to find next match =A0So=A0
I think there = is something wrong with the TAGS file.=A0

>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 se= cond 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. =A0I remember th= ere is a mode which can show the Octal/Hex code for all characters but I fo= rget how to invoke this. Thanks.=A0
--bcaec51dd7d98be23904ae3ee254--