GNU bug report logs - #19466
25.0.50; xref-find-def doesn't find C functions

Previous Next

Package: emacs;

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


Message #152 received at 19466 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 19466 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, eller.helmut <at> gmail.com
Subject: Re: bug#19466: 25.0.50; xref-find-def doesn't find C functions
Date: Fri, 23 Jan 2015 16:15:49 -0500
>> If xref can reliably deduce that I switched projects and automatically
>> update its database, that's fine with me, and would probably
>> constitute what you mean by "dependence on the current file or
>> project".

Right, ideally that's what tags.el should do: it should associate
a "file-system area" to each TAGS file; so it can know automatically
which TAGS file to use based on default-directory.

Whether it then keeps several TAGS file opened at the same time, or
whether it only keeps a single-one-at-a-time (and reloads the other
when you move to a buffer that belongs to a different project) is just
an implementation detail.

>> Take, for example, the use case where I'm testing a program and found
>> a bug.  I then need to be able to quickly find and examine the
>> definition of symbols that might be involved in the bug, look at their
>> code, perhaps make some changes -- this all will be served well by
>> using the database (such as TAGS) of that single program.  But suppose
>> I now come to the conclusion that the bug is not in the program per
>> se, but involves one of the external libraries it uses.  Now I need to
>> go through the sources of that library (whose sources, by sheer luck
>> or maybe something else, I already have available on my system).  How
>> would xref or etags know whether I switched to that library as part of
>> my previous work (and therefore still need access to the previous
>> project's symbols), or because I'm now working on an entirely
>> different project?

It wouldn't and it would only give you access to the identifiers of the
project to which the current-buffer belongs.  So if you use M-. from
a file in the buggy library it's use the TAGS file of that library, and
if you then go to a different buffer belonging to your program and use
M-. xref should then use the TAGS file of that program.  I.e. you tell
Emacs which TAGS file to use by selecting an appropriate buffer before
you hit M-.


        Stefan




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.