all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: regular expression in find-tag-regexp
Date: Sat, 01 Oct 2011 11:09:43 +0300	[thread overview]
Message-ID: <83ipo9ceuw.fsf@gnu.org> (raw)
In-Reply-To: <CAOm4EMs_Z8nAWkW3aFRxxuGSomX1xiK0wmRCDQ+sOqrWi=eA+g@mail.gmail.com>

> Date: Fri, 30 Sep 2011 17:55:52 -0500
> From: Shiyuan <gshy2014@gmail.com>
> 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.



  reply	other threads:[~2011-10-01  8:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-29 22:54 regular expression in find-tag-regexp Shiyuan
2011-09-30  6:53 ` Eli Zaretskii
2011-09-30 22:55 ` Shiyuan
2011-10-01  8:09   ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-10-01 16:03 Shiyuan
2011-10-01 16:19 ` Drew Adams
2011-10-01 17:52 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83ipo9ceuw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.