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

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

bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++


From: Dmitry Gutov
Subject: bug#20629: 25.0.50; Regression: TAGS broken, can't find anything in C++ files.
Date: Sat, 30 May 2015 18:03:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0

On 05/30/2015 05:31 PM, Eli Zaretskii wrote:

Feel free to describe a full recipe for comparing.  I needed to guess
what you wanted me to test; I'd be happy to just follow instructions
and report back what I saw.

I'd rather not bother (let's see if we can conclude this thread of discussion without that). The patch in question is at http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20629#59, and I'm officially withdrawing it.

- Like you mentioned, it's not always that qualified name occurs in the
pattern. Sometimes it's creates using curly braces and such, and thus
can only occur in an explicit tag name (which the discussed patch won't
account for). Thus, some qualified names would be present in
completions, and some won't. This is bad.

Do you have an actual example?  AFAIU, this shouldn't happen: etags
only decides that an explicit tag name is unneeded when it can be
deduced from the pattern.  So if the explicit tag is not in TAGS, it
means etags.el can find it in the pattern.  (Qualified tag names that
are constructed by etags are never in the pattern, so they will always
get explicit tag names.)

I believe that the current choice is between "etags produces unqualified tags" and "etags produces both qualified and unqualified tags for lines where the distinction appies" (2 entries per line).

In the latter case the patch above is extraneous. So above I'm describing the situation where etags produces unqualified tags (which it currently does, by default).

Yes, but I'd like to make a decision before making the change for
placing 2 entries, so that the number of backward-incompatible changes
could be minimized.

I think that would be a mistake. Rather, we should make the choice based on correctness.

Because if tag-exact-match-p finds a match, tag-implicit-name-match-p
will not be invoked, AFAIU.

It would, but that's not the point. But yes, the above would make sense. Anyway...

And AFAIU we don't, because the match methods are invoked in order,
until one of them yields a match.

Of course the difference in tag-implicit-name-match-p behavior will only matter when tag-exact-match-p returns nil for the entry in question. Which is the case in the example I've given in the previous email.

Which is why there's an explicit tag there.  But I'm afraid I don't
see what you meant to demonstrate by this example.  Which code will
look for 'edit-abbrevs-map, and under what circumstances?

find-tag, for instance. After being asked by the user. Like I said, it's a contrived example (users don't usually bother with names as tricky as this one), but I can try to cook up a more realistic one, if you insist.

An Elisp identifier can actually include a quote if it's escaped, but that's not the case with edit-abbrevs-map.

It's harder to present a realistic case of a user looking for one thing
and getting another, but the point is, is the Etags parser decided that
the implicit tag doesn't match the explicit tag, we should ignore the
former (because we don't really know the way they mismatch).

I think we already do.

Currently, we don't put the implicit tag into the completion table if the explicit tag is present.

But we do match implicit tags during navigation, even when an explicit tag is there.

The aforementioned patch would include the implicit tag in the completion table anyway. I'm now saying we don't want that, and we also don't want navigation to match implicit tags in the entries that contain an explicit tag as well.





reply via email to

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