From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>, HGY <mohu3g@163.com>
Cc: 21443@debbugs.gnu.org
Subject: bug#21443: 24.5; etags' complete-tag changes the global value of tags-file-name
Date: Tue, 24 Nov 2015 00:03:12 +0200 [thread overview]
Message-ID: <56538D20.9090106@yandex.ru> (raw)
In-Reply-To: <83lhcd4f4n.fsf@gnu.org>
On 09/11/2015 09:57 AM, Eli Zaretskii wrote:
> You can't, currently. You need to invoke visit-tags-table manually,
> with a prefix argument, before the mini-buffer completion. This is
> how the code was designed.
Unfortunately, this is also broken: you can C-u M-x visit-tags-table,
and it will set the local value of tags-file-name, but as soon as you
M-x find-tag, it changes the global value of tags-file-name as well, to
the last element in tags-table-list.
Apparently because the lambda in tags-lazy-completion-table calls
visit-tags-table-buffer at least twice, and the latter function modifies
tags-file-name, _and_ changes the current buffer (and when called the
second time, it changes tags-file-name in the tags table buffer, thus
changing the global value).
And I can't simply wrap most of the second half of
visit-tags-table-buffer in a with-current-buffer, because some code
assumes that the buffer does indeed change. Otherwise, the value of
tags-completion-table-function is nil (tags-completion-table calls it
after calling visit-tags-table-buffer).
Modifications of tags-file-name are also numerous, so changing a couple
of setq to setq-local inside visit-tags-table-buffer doesn't do the
trick either.
At this point I'm leaving this to someone else who's more motivated. But
we'll likely already migrate to e.g. GNU Global before that happens.
prev parent reply other threads:[~2015-11-23 22:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 13:18 bug#21443: 24.5; etags' complete-tag changes the global value of tags-file-name HuangMario
2015-09-10 19:06 ` Eli Zaretskii
2015-09-11 0:30 ` Dmitry Gutov
2015-09-11 4:56 ` Eli Zaretskii
2015-09-11 13:59 ` Dmitry Gutov
2015-09-16 2:33 ` HGY
[not found] ` <4b3df5cb.21a.14fbb06425d.Coremail.mohu3g@163.com>
2015-09-11 6:57 ` Eli Zaretskii
2015-11-23 22:03 ` Dmitry Gutov [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56538D20.9090106@yandex.ru \
--to=dgutov@yandex.ru \
--cc=21443@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mohu3g@163.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.