GNU bug report logs -
#19466
25.0.50; xref-find-def doesn't find C functions
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Mon, 29 Dec 2014 19:28:02 UTC
Severity: normal
Found in version 25.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Tue, 30 Dec 2014 06:57:49 +0200
> From: Dmitry Gutov <dgutov <at> yandex.ru>
>
> On 12/29/2014 09:27 PM, Eli Zaretskii wrote:
>
> Run "make TAGS" in the top-level directory, then:
>
> emacs -Q
> Click menu-bar->Edit->Go To->Set Tags File Name
> Navigate to src/TAGS and select it in the file selection dialog
> Click menu-bar->Edit->Go To->Find Definition
> Type "display_line RET" at the prompt
> => [No match]
>
> Are you doing that in e.g. emacs-lisp-mode buffer?
I did it in *scratch*. But *scratch*'s major mode is not
emacs-lisp-mode, it's lisp-interaction-mode. I think the difference
is significant for the purposes of this discussion.
> Naturally, it wouldn't work, because that major mode defines its own identifier completion table and find-definition function.
>
> I understand what you're trying to do, but don't see a way to achieve that while keeping the uniform interface for the user in different major modes (which can use different navigation logic).
Isn't it possible to _prefer_ the symbols that are consistent with the
major mode, but not entirely discard the other possible candidates?
In a mixed-language project such as Emacs, these subtle conditions
that completely conceal symbols depending on the current mode, make
very little sense to me. (And there are other mixed-language projects
out there, like Guile, GDB, etc.) The Emacs TAGS tables traditionally
included tags from lisp/ files in src/TAGS, and for a very good
reason.
> Suggestions welcome, but maybe you should just keep using `find-tag'. The generic navigation commands are more useful to have as the menu items, though.
I assume that this new facility is an improvement, so I _want_ to use
it. Especially since NEWS says:
** etags
As a result of the above, these commands are now obsolete:
`find-tag-other-window', `find-tag-other-frame', `find-tag-regexp',
`tags-apropos' and `tags-loop-continue'.
Considering something obsolete means that a replacement is available
that is as good or better than the replaced feature. I don't want to
go back to obsolete commands, unless I really have to, i.e. unless I
find the situation with xref unbearable. I hope we are not there yet.
> Alternatively, you could reset `xref-find-function' and `xref-identifier-completion-table-function' to their default values in `emacs-lisp-mode-hook'. That could be a decent choice if your TAGS file includes the lisp files as well.
See above: out src/TAGS includes lisp/TAGS. We do this for a long
time, and it's a tremendously useful thing when working on Emacs
development.
This bug report was last modified 10 years and 152 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.