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: 20629@debbugs.gnu.org
Subject: bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files.
Date: Fri, 29 May 2015 21:28:39 +0300	[thread overview]
Message-ID: <83617bw84o.fsf@gnu.org> (raw)
In-Reply-To: <55687241.5030200@yandex.ru>

> Cc: 20629@debbugs.gnu.org
> From: Dmitry Gutov <dgutov@yandex.ru>
> Date: Fri, 29 May 2015 17:05:53 +0300
> 
> That can be mitigated by parsing out implicit tag names out of patterns, 
> however they also don't always contain qualified names (which was my 
> misunderstanding: they do in the toy example provided by Jan).

At least in C++, class members can be qualified explicitly in the
source (which was what Jan's example did), or they can be qualified
implicitly, by including them inside braced constructs, for example.
For the latter, etags (now only under -Q) adds the qualifications when
it generates the tags.

The code I added _removes_ the explicit qualifications, and doesn't
add the ones for implicitly qualified members.

> So, having qualified names in tag completion reliably is out of the
> question, unless etags uses them in tag names.

Exactly.

> > Yes, but I think if we change etags to create duplicate tags, we
> > should have this feature opt-out, unlike Exuberant, otherwise TAGS
> > created by default will be deficient with xref.  Do you agree?
> 
> I'd say no. First, there's value is simply being compatible.

Compatibility aside, I think what most users will want should be the
default.  What Exuberant ctags does now might not yet reflect the
changes in Emacs, from etags.el's UI to xfer.  Once they learn about
that, they might turn that flag on by default as well.

> Second, as the ctags man page warns, including both qualified and 
> unqualified names in separate entries, "could potentially more than 
> double the size of the tag file".

Who cares?  Disk space is no longer at premium.

> Which increases the time it takes to load one, and might (if we make
> more progress on Stefan's suggestion not to pre-build tags
> completion table) also make completion slower, in projects of
> certain size.

For moderate-size projects, the obarray-based completion is
instantaneous, so I'm not afraid of this.

> """
> The actual form of the qualified tag depends upon the language from 
> which the tag was derived (using a form that is most natural for how 
> qualified calls are specified in the language). For C++, it is in the 
> form "class::member"; for Eiffel and Java, it is in the form "class.member".
> """
> 
> If we posit that in each interesting language a qualified tag is of the 
> form CONTEXT-CHAR-NAME, standardizing on CHAR would allow us to extract 
> both qualified and unqualified tag names from a single entry, at a small 
> cost in readability for users where the language traditionally uses a 
> different separator than the one picked by etags.

I don't think we can safely do that, since different characters can
appear in identifiers of different languages.  By using the qualifier
string that is natural for the language, we make sure we never get
conflicts with the identifiers themselves.

Also, these qualified tags are for human consumption, which is another
argument on favor of language-specific syntax.

> For better uniqueness, I'd choose two of them: # before instance 
> methods, and . before class (or static) methods. This notation is fairly 
> popular and is used in Javadocs, as well as in different comment formats 
> Ruby uses.

Which means C++ programmers will probably be confused by them.





  parent reply	other threads:[~2015-05-29 18:28 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22  5:57 bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files Jan D.
2015-05-23 11:54 ` Jan Djärv
2015-05-23 12:04   ` Dmitry Gutov
2015-05-23 12:15     ` Jan Djärv
2015-05-23 12:18       ` Dmitry Gutov
2015-05-23 12:28         ` Jan Djärv
2015-05-23 12:39           ` Dmitry Gutov
2015-05-23 13:51           ` Eli Zaretskii
2015-05-23 13:50       ` Eli Zaretskii
2015-05-23 14:46         ` Eli Zaretskii
2015-05-23 15:56           ` Eli Zaretskii
2015-05-25 15:15             ` Eli Zaretskii
2015-05-25 21:17               ` Dmitry Gutov
2015-05-26  2:35                 ` Eli Zaretskii
2015-05-26 10:16                   ` Dmitry Gutov
2015-05-26 15:06                     ` Eli Zaretskii
2015-05-26 19:00                       ` Dmitry Gutov
2015-05-26 19:23                         ` Eli Zaretskii
2015-05-26 21:01                           ` Stefan Monnier
2015-05-28 11:54                             ` Dmitry Gutov
2015-05-28 12:59                               ` Dmitry Gutov
2015-05-26 23:56                           ` Dmitry Gutov
2015-05-27 14:28                             ` Eli Zaretskii
2015-05-27 15:28                               ` Dmitry Gutov
2015-05-27 15:46                                 ` Eli Zaretskii
2015-05-27 15:54                                   ` Dmitry Gutov
2015-05-27 16:23                                     ` Eli Zaretskii
2015-05-27 23:50                                       ` Dmitry Gutov
2015-05-28  2:50                                         ` Eli Zaretskii
2015-05-28 10:22                                           ` Dmitry Gutov
2015-05-28 14:56                                             ` Eli Zaretskii
2015-05-28 15:32                                               ` Dmitry Gutov
2015-05-28 16:34                                                 ` Eli Zaretskii
2015-05-29  0:09                                                   ` Dmitry Gutov
2015-05-29  6:48                                                     ` Glenn Morris
2015-05-29  8:09                                                       ` Eli Zaretskii
2015-05-29 12:34                                                         ` Francesco Potortì
2015-05-29  9:27                                                       ` Dmitry Gutov
2015-05-29  8:12                                                     ` Eli Zaretskii
2015-05-29 14:05                                                       ` Dmitry Gutov
2015-05-29 16:51                                                         ` Stefan Monnier
2015-05-29 17:12                                                           ` Dmitry Gutov
2015-05-29 19:19                                                             ` Stefan Monnier
2015-05-29 20:33                                                               ` Dmitry Gutov
2015-05-29 21:41                                                                 ` etags completion table (was: bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files) Stefan Monnier
2015-05-29 23:58                                                                   ` etags completion table Dmitry Gutov
2015-05-30  4:00                                                                     ` Stefan Monnier
2015-05-30 11:50                                                                       ` Dmitry Gutov
2015-05-31  0:57                                                                         ` Stefan Monnier
2015-05-29 18:28                                                         ` Eli Zaretskii [this message]
2015-05-29 20:01                                                           ` bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files Dmitry Gutov
2015-05-29 20:35                                                             ` Eli Zaretskii
2015-05-29 22:36                                                               ` Dmitry Gutov
2015-05-30  6:52                                                                 ` Eli Zaretskii
2015-05-30 12:52                                                                   ` Dmitry Gutov
2015-05-30 13:03                                                                     ` Eli Zaretskii
2015-05-30 14:21                                                                     ` Francesco Potortì
2015-05-30 14:44                                                                       ` Dmitry Gutov
2015-05-28 11:35                                   ` Francesco Potortì
2015-05-28 11:46                                     ` Dmitry Gutov
2015-05-28 12:16                                       ` Francesco Potortì
2015-05-28 13:00                                         ` Dmitry Gutov
2015-05-28 13:12                                           ` Francesco Potortì
2015-05-28 15:04                                             ` Eli Zaretskii
2015-05-28 15:14                                               ` Francesco Potortì
2015-05-28 15:29                                                 ` Francesco Potortì
2015-05-29 17:13                                                 ` Dmitry Gutov
2015-05-30 12:06                             ` Eli Zaretskii
2015-05-30 12:30                               ` Dmitry Gutov
2015-05-30 12:46                                 ` Eli Zaretskii
2015-05-30 13:42                                   ` Dmitry Gutov
2015-05-30 14:31                                     ` Eli Zaretskii
2015-05-30 15:03                                       ` Dmitry Gutov
2015-05-30 16:37                                         ` Eli Zaretskii
2015-05-30 17:46                                           ` Dmitry Gutov
2015-05-30 18:46                                             ` Eli Zaretskii
2015-05-30 19:42                                               ` Dmitry Gutov
2015-11-26  3:23                                                 ` Dmitry Gutov
2015-11-26 15:43                                                   ` Eli Zaretskii
2015-11-26 16:12                                                     ` Dmitry Gutov
2015-11-26 16:32                                                       ` Eli Zaretskii
2015-11-27  3:54                                                         ` Dmitry Gutov
2016-03-19 18:45                                                           ` Eli Zaretskii
2015-05-30 17:01                                       ` Francesco Potortì
2015-05-30 18:13                                         ` Dmitry Gutov
2015-05-30 18:42                                           ` Eli Zaretskii
2015-05-30 19:35                                           ` Francesco Potortì
2015-05-30 20:04                                             ` Dmitry Gutov
2015-05-30 22:35                                               ` Francesco Potortì
2015-05-31  0:34                                                 ` Dmitry Gutov
2015-05-31 21:46 ` bug#20629: Fwd: bug#20703: 24.4; Stack overflow in regexp matcher Francesco Potortì
2015-05-31 22:20   ` Dmitry Gutov
2015-05-31 22:40     ` Francesco Potortì

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=83617bw84o.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=20629@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.