GNU bug report logs -
#78489
30.1.50; Using etags, Ada and xref-find-definitions doesn't find definitions
Previous Next
Full log
Message #89 received at 78489 <at> debbugs.gnu.org (full text, mbox):
> From: Troy Brown <brownts <at> troybrown.dev>
> Date: Thu, 10 Jul 2025 21:26:30 -0400
> Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 78489 <at> debbugs.gnu.org
>
> On Sat, Jul 5, 2025 at 3:59 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> > > From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> > > Cc: Eli Zaretskii <eliz <at> gnu.org>, 78489 <at> debbugs.gnu.org
> > > Date: Tue, 24 Jun 2025 18:11:31 -0400
> > >
> > > Hi Troy,
> > >
> > > > For a mode-specific solution, I'm currently using the following. It
> > > > modifies the result of the completion table to remove the suffix, but
> > > > stores the suffix as a text property on the candidate. Then the text
> > > > property is retrieved from within the annotation function to generate
> > > > the appropriate suffix. In this example, I chose to use a more
> > > > descriptive suffix rather than reapplying the original one. I'm also
> > > > using the text property to drive additional "company-kind" information
> > > > too. This solution seems to be working well for me.
> > >
> > > That seems like a much better solution than my exit-function, indeed.
> > >
> > > I suggest adding it to `ada-mode` plus adding to `etag.el` a comment
> > > pointing to that ada-mode` code.
> > >
> > > The `etags.el` comment is because `etags.el` now has partial support for
> > > those `/X` annotations. This partial support is used only for Ada
> > > currently, but the way it's implemented in `etags.el` it can be used for
> > > any language, so it could make sense in the future to move your code
> > > into `etags.el`.
> > >
> > > Another option would be to put the code directly in `etags.el`, and make
> > > it non-specific to Ada. To reduce the cost of your wrapper, we could use
> > > an `etags--found-slash-x-annotation` variable which is set whenever we
> > > match the "/[...]" while reading the TAGS file, and then we only do the
> > > extra dance when that var is non-nil.
> >
> > Ping! Any further comments, or should I close this bug?
>
> I'd be fine if someone wanted to make it more general. There are
> actually multiple Ada major modes available. The ada-mode in ELPA is
> currently unmaintained, but there are at least 3 alternatives that I'm
> aware of (including my own ada-ts-mode). The ideal solution is likely
> one where everyone can benefit, but barring someone wanting to drive
> this to a generalized conclusion, I'm fine with a mode-specific
> solution.
To have this in the Ada modes out there, we need to bring the
respective authors on board of this discussion. Would someone like to
do that, please?
This bug report was last modified 55 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.