Subject: bug#28403: 25.2; find-tag works, but xref-find-definitions

From: Dmitry Gutov <[email-masked]>
Date: Mon, 11 Sep 2017 00:35:01 +0300

On 9/11/17 12:18 AM, Winston wrote:

> * Find "foo" (partial name) didn't: rather than creating a window with
>     the alternatives, it failed with "No definitions found for: foo".

That is because 'foo' is not defined in that file. And showing either of 
the two lines as a match for it would be a false positive.

You should probably use project-find-regexp. Or use C-u M-x 
xref-find-definitions with completion: you type 'foo', TAB, then see the 
available tags that start with that string, pick one of them, and see 
its definitions.

>     find-tag given the same string "foo" went to the first one.
>     xref-find-definitions with Dmitry's suggested change also worked
>     (yesterday, without the special etags --regex TAGS, popping up a
>     window with the alternatives).
> 
> Any suggestions?

Just what I suggested before. But this problem is not related to your 
use of macros anymore.

>   -WBE
> 
> P.S. Also, I'm finding it mildly annoying that xref-find-definitions,
>       when next to just about any word, including text in comments, tries
>       immediately to go to that word as a tag rather than prompting me
>       for a name with the word as the default, as find-tag did.  That
>       means I'll have to remember to use my {arg} key fairly often to
>       tell it "don't do that, prompt me."  Is there an "always prompt"
>       option, or do I need to write a trivial wrapper function?

You can customize xref-prompt-for-identifier to t.