Subject: Re: bug#19466: 25.0.50; xref-find-def doesn't find C functions

From: Dmitry Gutov <[email-masked]>
Date: Thu, 22 Jan 2015 04:43:47 +0200

On 01/21/2015 06:25 PM, Eli Zaretskii wrote:

> Can the package that uses xref modify that string?  If so, we don't
> need a single-fits-all phrase.

It can't, right now. But it would have to be modified by the used 
command (find-definitions/references/apropos), not the package.

> If we do need a single phrase, then how about "go to
> definition/reference"?

I've settled on "follow reference" for now.

> Perhaps you could ask what issues need to be resolved for you to
> understand the requirements.

Someone would have to gather them, and participate in the discussion 
about the tradeoffs.

AFAICS you've pretty much stopped formulating the requirements at "there 
should be a way to use the tags.el backend instead of the major mode's 
backend". That's not good enough for me.

> If you can show me the complete Lisp, I can try that and return
> feedback.

That would be good, but unless you declare one of them good enough, 
participation in the technical discussion will also be needed.

>> Messages 32 and 41 include functional implementations you can try. The
>> patches that would go into Emacs won't be much different, we'd just have
>> to decide on code organization.
>
> The recipe in #32 is clearly incomplete.  Not sure about 41.

It's only incomplete because I expected you'd be able to turn on the 
minor mode defined there yourself, in any Emacs Lisp buffers you like.

Here's the "missing piece" for #32:

(defun elisp-maybe-turn-on-xref-etags-mode ()
   (when (and buffer-file-name
              (string-prefix-p source-directory buffer-file-name))
     (xref-etags-mode)))

(add-hook 'emacs-lisp-mode-hook 'elisp-maybe-turn-on-xref-etags-mode)

Which part of it was hard?

> Once again, if you can show a complete Lisp to try, I will.

To my knowledge, #41 was/is quite complete.