* `find-tag-regexp` doesn't find all the matches
@ 2015-07-11 16:24 Raffaele Ricciardi
2015-07-11 21:40 ` Ian Zimmerman
0 siblings, 1 reply; 2+ messages in thread
From: Raffaele Ricciardi @ 2015-07-11 16:24 UTC (permalink / raw)
To: help-gnu-emacs
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,
Pressing `C-u C-M-.` again sometimes finds the other matches, and
sometimes says "No more tags matching \_<sscanf\_>". However,
`M-. sscanf RET` followed by `C-u M-.` still works. It seems that
`find-tag-regexp` gets stuck, whilst `find-tag` doesn't. Maybe the
issue is that there are two tag tables in `tags-table-list` (I am
guessing because I haven't been able to reproduce this issue with one
table only).
Thanks for you help.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: `find-tag-regexp` doesn't find all the matches
2015-07-11 16:24 `find-tag-regexp` doesn't find all the matches Raffaele Ricciardi
@ 2015-07-11 21:40 ` Ian Zimmerman
0 siblings, 0 replies; 2+ messages in thread
From: Ian Zimmerman @ 2015-07-11 21:40 UTC (permalink / raw)
To: help-gnu-emacs
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-11 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-11 16:24 `find-tag-regexp` doesn't find all the matches Raffaele Ricciardi
2015-07-11 21:40 ` Ian Zimmerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).