From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <834mr2hlfy.fsf@gnu.org> References: <867fw1z9m9.fsf@yandex.ru> <83egq8gqxu.fsf@gnu.org> <54D0288B.7000503@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422989964 4979 80.91.229.3 (3 Feb 2015 18:59:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Feb 2015 18:59:24 +0000 (UTC) Cc: 19741@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 03 19:59:23 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YIigt-00058B-Qv for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Feb 2015 19:59:16 +0100 Original-Received: from localhost ([::1]:60940 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIigo-00048D-Bx for geb-bug-gnu-emacs@m.gmane.org; Tue, 03 Feb 2015 13:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIigk-00047k-5y for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2015 13:59:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIigg-0002Aa-Nd for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2015 13:59:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41895) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIigg-0002AQ-K0 for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2015 13:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YIigg-0007jB-En for bug-gnu-emacs@gnu.org; Tue, 03 Feb 2015 13:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Feb 2015 18:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19741 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19741-submit@debbugs.gnu.org id=B19741.142298989429646 (code B ref 19741); Tue, 03 Feb 2015 18:59:02 +0000 Original-Received: (at 19741) by debbugs.gnu.org; 3 Feb 2015 18:58:14 +0000 Original-Received: from localhost ([127.0.0.1]:33135 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIift-0007i4-Jb for submit@debbugs.gnu.org; Tue, 03 Feb 2015 13:58:13 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:34110) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIifr-0007hq-7d for 19741@debbugs.gnu.org; Tue, 03 Feb 2015 13:58:11 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0NJ700E00LSMA800@a-mtaout21.012.net.il> for 19741@debbugs.gnu.org; Tue, 03 Feb 2015 20:58:04 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJ700EHUM0S9540@a-mtaout21.012.net.il>; Tue, 03 Feb 2015 20:58:04 +0200 (IST) In-reply-to: <54D0288B.7000503@yandex.ru> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:99019 Archived-At: > Date: Tue, 03 Feb 2015 03:46:51 +0200 > From: Dmitry Gutov > 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.