bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#21934: 24.5; find-tag: reading TAGS file incorrectly
Date: Sun, 22 Nov 2015 18:12:55 +0200

> Cc: 21934@debbugs.gnu.org, andreas.matthias@gmail.com
> From: Dmitry Gutov <dgutov@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]