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: Mon, 02 Feb 2015 19:32:13 +0200 Message-ID: <83egq8gqxu.fsf@gnu.org> References: <867fw1z9m9.fsf@yandex.ru> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1422898396 29919 80.91.229.3 (2 Feb 2015 17:33:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2015 17:33:16 +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 Mon Feb 02 18:33:16 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 1YIKs6-0008G4-6A for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Feb 2015 18:33:14 +0100 Original-Received: from localhost ([::1]:55745 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKs5-0003MK-GK for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 Feb 2015 12:33:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51881) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKry-0003Kp-3x for bug-gnu-emacs@gnu.org; Mon, 02 Feb 2015 12:33:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YIKru-0004yu-0C for bug-gnu-emacs@gnu.org; Mon, 02 Feb 2015 12:33:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41124) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIKrt-0004ym-UB for bug-gnu-emacs@gnu.org; Mon, 02 Feb 2015 12:33:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YIKrt-0003po-OC for bug-gnu-emacs@gnu.org; Mon, 02 Feb 2015 12:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Feb 2015 17:33:01 +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.142289835614699 (code B ref 19741); Mon, 02 Feb 2015 17:33:01 +0000 Original-Received: (at 19741) by debbugs.gnu.org; 2 Feb 2015 17:32:36 +0000 Original-Received: from localhost ([127.0.0.1]:60597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIKrT-0003p1-OB for submit@debbugs.gnu.org; Mon, 02 Feb 2015 12:32:36 -0500 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:33478) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YIKrR-0003oj-AF for 19741@debbugs.gnu.org; Mon, 02 Feb 2015 12:32:34 -0500 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0NJ500700N4YQQ00@mtaout25.012.net.il> for 19741@debbugs.gnu.org; Mon, 02 Feb 2015 19:27:30 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NJ5003OYN5UQB30@mtaout25.012.net.il>; Mon, 02 Feb 2015 19:27:30 +0200 (IST) In-reply-to: <867fw1z9m9.fsf@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:98986 Archived-At: > From: Dmitry Gutov > Date: Sun, 01 Feb 2015 21:59:10 +0200 > > 1. M-x find-file lisp/progmodes/etags.el. Being in that buffer, and not > in *scratch*, is somehow important. > > 2. M-x visit-tags-table ../../lisp/TAGS. > > 3. M-x find-tag, press TAB, see the table loaded. > > 4. M-x visit-tags-table, ../../src/TAGS, press `y' (important!). > > 5. M-x find-tag, type `display_li', press TAB, see [No matches]! > > The main scenario ends here. > > 6. Finish typing `display_line', press RET, see the navigation succeed > anyway (with a jump to src/xdisp.c:20013). > > 7. Press `M-,' to get back to etags.el, repeat 5., see the same result. > > 8. M-x find-file ../../src/search.c, repeat 5., see a different result. 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. IOW, it reuses the existing value of tags-completion-table (the variable). However, visiting the second TAGS table didn't update the completion table, so you get "No match".