Subject: Re: bug#19468: 25.0.50; UI inconveniences with M-.

From: Dmitry Gutov <[email-masked]>
Date: Tue, 28 Apr 2015 01:25:14 +0300

On 04/27/2015 08:21 PM, Stefan Monnier wrote:

> The different ways to call xref-find-function are to distinguish
> jumping to the definition or to "all uses", and currently few backends
> support those features, I don't think we have a clear idea yet of how
> they should be presented to the user, and there are too many variants to
> collapse them all into C-u.  So they'd probably be provided via
> different commands instead of all being accessed via M-.

M-x xref-find-references, for starters.

> -  (setq-local xref-find-function #'elisp-xref-find)
> -  (setq-local xref-identifier-completion-table-function
> -              #'elisp--xref-identifier-completion-table)
> +  (add-function :before-until (local 'xref-find-function) #'elisp-xref-find)
> +  (add-function :before-until (local 'xref-identifier-completion-table-function)
> +                #'elisp--xref-identifier-completion-table)

This doesn't look right:

- When I try to jump to a symbol, and there isn't one with that name, I 
want to see the message "no definitions found", not a "Visit tags table" 
prompt.

- If I do have a tags table loaded, it's likely for a different project 
than Emacs. This is most likely true for the majority of our users.

I think Eli (and everyone like-minded) should advise elisp-xref-find and 
xref-identifier-completion-table-function instead, inside their init 
script, like suggested by Daniel in another thread.