Subject: bug#78489: 30.1.50; Using etags, Ada and xref-find-definitions doesn't find definitions

From: Troy Brown <[email-masked]>
Date: Mon, 26 May 2025 23:15:57 -0400

On Mon, May 26, 2025 at 10:33 PM Eli Zaretskii <[email-masked]> wrote:
>
> > In the testing I've done, this patch works correctly and addresses the
> > original problem reported.  However, as I explored this a bit further
> > I discovered another issue that involves completion.  After typing
> > 'Displ' and then `M-x completion-at-point`, the tag including the
> > suffix is completed (i.e., "Display_Message/p" is inserted into the
> > buffer, instead of just "Display_Message").
>
> That's how completion on Ada tags worked back when we used etags.el
> instead of Xref, so I consider this not to be a regression.  If you
> think otherwise, please explain why, or show a recipe which behaves
> differently in Emacs 24 and before.

Really?  So the user would complete and then have to delete the last
two characters of the completion in their buffer to remove the suffix?
 I'll take your word for it, that it operated that way, as I don't
think I have access to an Emacs 24 that I could test that with, but
that sounds broken...what's the point of completion if the inserted
text needs to be fixed up in the buffer afterwards?

Did you see the previous response I sent?  I think our responses may
have occurred around the same time.  I found a place to correct that
behavior in `etags-tags-completion-table` which is a regex fixup
similar to the first one.