From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: regular expression in find-tag-regexp Date: Sat, 01 Oct 2011 11:09:43 +0300 Message-ID: <83ipo9ceuw.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1317456602 15043 80.91.229.12 (1 Oct 2011 08:10:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 1 Oct 2011 08:10:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 01 10:09:59 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 1R9udx-0002Ru-FE for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Oct 2011 10:09:57 +0200 Original-Received: from localhost ([::1]:56812 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9udw-0000n1-W8 for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Oct 2011 04:09:56 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:35015) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9uds-0000mk-OV for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 04:09:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9udr-0006Ha-PH for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 04:09:52 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:63037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9udr-0006HM-IL for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 04:09:51 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LSD00400NVCNO00@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 11:09:41 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.228.74.35]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LSD0043FO0316K0@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Sat, 01 Oct 2011 11:09:40 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.166 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:82392 Archived-At: > Date: Fri, 30 Sep 2011 17:55:52 -0500 > From: Shiyuan > Cc: help-gnu-emacs@gnu.org > > >> 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. > > >It would help if you show what's in your TAGS file for these > >functions. > I open the TAGS with emacs and the "^?" belows indicate some unprintable > characters. > PetscErrorCode MatGetArray_SeqAIJ > PetscErrorCode MatGetArray(^?6203,228137 > PetscErrorCode MatGetArray_SeqBAIJ(^?2598,103252 > void PETSC_STDCALL matgetarrayf90_(^?28,985 > void PETSC_STDCALL matgetarray_(^?189,8574 > PetscErrorCode MatGetArray_MPIDense(^?186,6182 > PetscErrorCode MatGetArray_SeqDense(^?1428,50013 > > 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? > and btw what does the number mean in the TAGS file? The line number where the tag is in its file and the character number of the first character of that line.