GNU bug report logs - #21934
24.5; find-tag: reading TAGS file incorrectly

Previous Next

Package: emacs;

Reported by: Andreas Matthias <andreas.matthias <at> gmail.com>

Date: Mon, 16 Nov 2015 19:48:01 UTC

Severity: normal

Found in version 24.5

Done: Andreas Matthias <andreas.matthias <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: andreas.matthias <at> gmail.com, 21934 <at> debbugs.gnu.org
Subject: bug#21934: 24.5; find-tag: reading TAGS file incorrectly
Date: Sun, 22 Nov 2015 18:12:55 +0200
> Cc: 21934 <at> debbugs.gnu.org, andreas.matthias <at> gmail.com
> From: Dmitry Gutov <dgutov <at> yandex.ru>
> Date: Sun, 22 Nov 2015 03:17:09 +0200
> 
> > The OP complained about _completion_ on tag names, and suggested to
> > fix a regexp used by etags-tags-completion-table.  That regexp indeed
> > doesn't allow a period in an identifier name (probably because it's
> > disallowed in C-like languages).  However, find-tag itself doesn't use
> > that regexp,
> 
> If does, for completion. Type M-x find-tag RET TAB, and you'll see the 
> result of calling etags-tags-completion-table.

Completion is not an integral part of find-tag.

> > Now, find-tag is deprecated in Emacs 25, and M-. invokes
> > xref-find-definitions instead.  AFAIU, etags-tags-completion-table is
> > no longer relevant with xref.
> 
> It's (almost) just as relevant: type C-u M-. TAB.

As I said, completion in M-. in Emacs 25 works worse than in find-tag
in this case: it doesn't even succeed to complete "Rec TAB" into
"Rectangle".  I don't know why.

> > xref-find-definitions, if it's invoked
> > with a prefix argument, and if you type "Rectangle.getPos RET" at its
> > prompt, not surprisingly also finds the identifier.  Trying to invoke
> > completion after "C-u M-.", with test.lua as the current buffer,
> > doesn't succeed to complete even on Rectangle, so the situation here
> > is somewhat worse, but I'm not sure why.
> 
> Is it really any different? M-x find-tag RET TAB doesn't show anything 
> beginning with "Rectangle" either. I only get "getPos" as a completion 
> either way.

It's different if you type "Rec TAB".

> Either etags will have to consider that in both example declarations the 
> tag name must be "getPos", not "xxx.getPos", and put this tag name 
> explicitly into the entries, or lua-mode will have to change the syntax 
> class of "." to "symbol", so that (thing-at-point 'symbol) returns 
> "Circle.getPos" as the tag name.

Something like that, yes.

My main point is that it's easy to solve the completion case, but that
hardly help in using TAGS with Lua and the new xref commands.
Something else is missing.




This bug report was last modified 9 years and 176 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.