From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Choosing tags tables
Date: Thu, 20 Jul 2017 08:23:29 +0300 [thread overview]
Message-ID: <83k233bs1a.fsf@gnu.org> (raw)
In-Reply-To: <b3ca47b7-ddb0-1bb7-580c-17732ff6b853@gmail.com> (message from Daniel Lopez on Thu, 20 Jul 2017 04:17:23 +0100)
> From: Daniel Lopez <daniel.lopez999@gmail.com>
> Date: Thu, 20 Jul 2017 04:17:23 +0100
>
> So I set it up so that for example in my c++-mode-hook it sets
> tags-table-list with the multiple tags files I want to use for C++; the
> first is the library I use in all my C++ projects and the second is the
> project-specific tags file (assuming all project sources are in the same
> directory as TAGS, for now). I'm setting it as buffer-local so that it
> only applies to tag searches that are started when that buffer is current:
>
> (setq-local tags-table-list
> (list "/home/daniel/docs/code/c/reusable/checkout/dan/TAGS"
> (concat default-directory "TAGS")))
>
> However when I then do a xref-find-definitions Emacs prompts me:
> "Visit tags table (default TAGS):"
> because (in visit-tags-table-buffer) it's not looking for the
> buffer-local value of tags-table-list, only the global which is nil. If
> I go along with it and enter something then Emacs sets tags-file-name to
> my entry which means now I only have one tags file and my
> tags-table-list gets ignored.
I think this should be reported as a bug, using report-emacs-bug.
In your report, please provide more details about your conclusion that
visit-tags-table-buffer ignores buffer-local values: AFAICT, that
function does have provisions for considering local values, so it
could be that xref-find-definitions fails to invoke some functions
correctly or with the right buffer being the current one. A Lisp
backtrace at the time visit-tags-table-buffer could help.
Also, a minimal test case to reproduce the problem will be useful.
> Does anyone know of a better way to get this effect?
The way you tried first should "just work".
next prev parent reply other threads:[~2017-07-20 5:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-20 3:17 Choosing tags tables Daniel Lopez
2017-07-20 5:23 ` Eli Zaretskii [this message]
2017-07-20 9:58 ` Dmitry Gutov
2017-07-20 10:32 ` Eli Zaretskii
2017-07-20 13:42 ` Daniel Lopez
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=83k233bs1a.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/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.
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).