From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 19466@debbugs.gnu.org, eller.helmut@gmail.com
Subject: bug#19466: 25.0.50; xref-find-def doesn't find C functions
Date: Fri, 23 Jan 2015 16:15:49 -0500 [thread overview]
Message-ID: <jwv4mrhtd8j.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <54C28635.8070606@yandex.ru> (Dmitry Gutov's message of "Fri, 23 Jan 2015 19:34:45 +0200")
>> 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
next prev parent reply other threads:[~2015-01-23 21:15 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-29 19:27 bug#19466: 25.0.50; xref-find-def doesn't find C functions Eli Zaretskii
2014-12-30 4:57 ` Dmitry Gutov
2014-12-30 15:31 ` Eli Zaretskii
2014-12-30 18:05 ` Stefan Monnier
2014-12-30 18:25 ` Dmitry Gutov
2014-12-30 18:34 ` Eli Zaretskii
2014-12-30 18:38 ` Dmitry Gutov
2014-12-30 22:44 ` Stefan Monnier
2015-01-02 17:52 ` Dmitry Gutov
2015-01-04 20:10 ` Stefan Monnier
2015-01-04 20:29 ` Eli Zaretskii
2015-01-04 23:14 ` Dmitry Gutov
2015-01-05 3:36 ` Eli Zaretskii
2015-01-05 6:11 ` Stefan Monnier
2015-01-16 3:37 ` Dmitry Gutov
2015-01-16 7:47 ` martin rudalics
2015-01-16 9:04 ` Eli Zaretskii
2015-01-16 9:28 ` martin rudalics
2015-01-19 3:31 ` Dmitry Gutov
2015-01-19 8:28 ` martin rudalics
2015-01-19 13:32 ` Dmitry Gutov
2015-01-20 8:01 ` martin rudalics
2015-01-20 12:14 ` Dmitry Gutov
2015-01-20 14:51 ` martin rudalics
2015-01-21 7:20 ` Dmitry Gutov
2015-01-21 10:49 ` martin rudalics
2015-01-21 14:24 ` Dmitry Gutov
2015-01-21 16:54 ` martin rudalics
2015-01-21 18:00 ` martin rudalics
2015-01-21 20:02 ` Stefan Monnier
2015-01-22 2:32 ` Dmitry Gutov
2015-01-22 18:22 ` martin rudalics
2015-01-21 19:02 ` Dmitry Gutov
2015-01-22 2:26 ` Dmitry Gutov
2015-01-22 18:22 ` martin rudalics
2015-01-19 17:41 ` Eli Zaretskii
2015-01-20 2:54 ` Dmitry Gutov
2015-01-20 17:24 ` Eli Zaretskii
2015-01-20 20:49 ` Dmitry Gutov
2015-01-21 16:25 ` Eli Zaretskii
2015-01-22 2:43 ` Dmitry Gutov
2015-01-22 18:02 ` Eli Zaretskii
2015-01-22 21:02 ` Dmitry Gutov
2015-01-23 9:03 ` Eli Zaretskii
2015-01-23 17:34 ` Dmitry Gutov
2015-01-23 21:03 ` Eli Zaretskii
2015-01-23 22:23 ` Dmitry Gutov
2015-01-24 9:40 ` Eli Zaretskii
2015-01-24 16:47 ` Dmitry Gutov
2015-01-31 8:52 ` Eli Zaretskii
2015-02-01 2:24 ` Dmitry Gutov
2015-02-01 16:01 ` Eli Zaretskii
2015-02-01 20:11 ` Dmitry Gutov
2015-02-01 20:30 ` Eli Zaretskii
2015-02-01 20:53 ` Dmitry Gutov
2015-02-02 3:32 ` Eli Zaretskii
2015-02-23 2:01 ` Dmitry Gutov
2015-01-23 21:15 ` Stefan Monnier [this message]
2015-01-23 21:34 ` Eli Zaretskii
2015-01-16 9:00 ` Eli Zaretskii
2015-01-04 22:14 ` Dmitry Gutov
2014-12-30 20:43 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4mrhtd8j.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=19466@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=eller.helmut@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).