all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 19741@debbugs.gnu.org
Subject: bug#19741: 25.0.50; find-tag completion uses an outdated cache of the tags table
Date: Tue, 03 Feb 2015 20:57:53 +0200	[thread overview]
Message-ID: <834mr2hlfy.fsf@gnu.org> (raw)
In-Reply-To: <54D0288B.7000503@yandex.ru>

> Date: Tue, 03 Feb 2015 03:46:51 +0200
> From: Dmitry Gutov <dgutov@yandex.ru>
> CC: 19741@debbugs.gnu.org
> 
> On 02/02/2015 07:32 PM, Eli Zaretskii wrote:
> 
> > I think this happens because visiting the second TAGS table doesn't
> > invalidate or recalculate tags-completion-table, which was generated
> > when you pressed TAB at the first find-tag prompt.  Look at the
> > function tags-completion-table, it does this:
> >
> >    (defun tags-completion-table ()
> >      "Build `tags-completion-table' on demand.
> >    The tags included in the completion table are those in the current
> >    tags table and its (recursively) included tags tables."
> >      (or tags-completion-table
> > 	;; No cached value for this buffer.
> 
> Seems so, but should the `tags-completion-table' value in the lisp/TAGS 
> buffer really include the entries from the other currently visited tables?

No, it shouldn't.  The problem is that tags-completion-table in
src/TAGS buffer remains nil.

It could be that the problem is in the heuristics employed by
visit-tags-table-buffer, when it needs to intuit what TAGS table to
use.  It does, for example, things like

		;; Third, look for a tags table that contains tags for the
		;; current buffer's file.  If one is found, the lists will
		;; be frobnicated, and CONT will be set non-nil so we don't
		;; do it below.
		(and buffer-file-name
		     (or
		      ;; First check only tables already in buffers.
		      (tags-table-including buffer-file-name t)
		      ;; Since that didn't find any, now do the
		      ;; expensive version: reading new files.
		      (tags-table-including buffer-file-name nil)))

which might explain why staying in etags.el produces the buggy
behavior.





  reply	other threads:[~2015-02-03 18:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-01 19:59 bug#19741: 25.0.50; find-tag completion uses an outdated cache of the tags table Dmitry Gutov
2015-02-02 17:32 ` Eli Zaretskii
2015-02-03  1:46   ` Dmitry Gutov
2015-02-03 18:57     ` Eli Zaretskii [this message]
2016-11-26 17:43 ` Josiah Schwab

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=834mr2hlfy.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=19741@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    /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.