[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `find-tag-regexp` doesn't find all the matches
From: |
Ian Zimmerman |
Subject: |
Re: `find-tag-regexp` doesn't find all the matches |
Date: |
Sat, 11 Jul 2015 14:40:47 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On 2015-07-11 18:24 +0200, Raffaele Ricciardi wrote:
> When I use `find-tag` to lookup a symbol, I get more matches than with
> `find-tag-regexp`.
>
> For example, to lookup "sscanf" with `find-tag`, I type `M-. sscanf RET`
> and then `C-u M-.` repeatedly, and I get this matches, one after
> another:
>
> # define sscanf __isoc99_sscanf
> sscanf,
> extern int __REDIRECT_NTH (sscanf, (const char *__restrict __s,
>
> Then `C-u M-.` starts to find matches where "sscanf" is a substring,
> therefore I stop.
>
> If instead I type `C-M-. \_<sscanf\_> RET`, I get this match:
>
> sscanf,
Are you sure the tags table buffer has a syntax table such that the
symbol boundaries fall where you expect them? The tags table buffer is
probably in fundamental mode, not C mode (or whatever that ugly language
is :)
So, at least as the next step in debugging this, I would try a more
specific regexp. Something like
[^a-zA-Z0-9_]sscanf[^a-zA-Z0-9_]
You'll also need to handle the case where it's at the beginning of line,
but that's an exercise for the reader.
--
Please *no* private copies of mailing list or newsgroup messages.
Rule 420: All persons more than eight miles high to leave the court.