[Top][All Lists]

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

Replacing find-tag with xref

From: R. Diez
Subject: Replacing find-tag with xref
Date: Tue, 30 Apr 2019 11:15:27 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi all:

I have a large C++ repository and build my own TAGS file.

I have been using find-tag and etags-select-find-tag-at-point for years. I am 
used to it, and it works fine.

Some time ago I noticed that find-tag was being deprecated, and I tried the 
suggested replacement, but I got frustrated and gave up.

This deprecation has now become a more serious issue, because etags.el is no longer present in a convenient package repository, like Emacs' default one or MELPA.

So I have tried again to replace find-tag and etags-select-find-tag-at-point 
with xref-find-definitions-other-window and the like, to no avail.

I realised that there have been long discussions about this in the past. This is the kind of issue that makes me long for an Emacs alternative. 8-((( But I guess there is nothing viable yet.

Can someone please help me with this matter? I need working replacements for 
these functions:

1) find-tag
This is what I use manually when I do not quite know what I am looking for.
It should suggest the thing at point.
It should support autocompletion.
It should always (and hopefully exclusively) look in my TAGS file, no matter 
what my current buffer is.

2) etags-select-find-tag-at-point
This is what I use on existing source code.
If there is just one match, it should not prompt, just jump to the declaration.
If there are many matches, it should display a list to choose from.
It should always (and hopefully exclusively) look in my TAGS file, no matter 
what my current buffer is.

I tried to make xref-find-definitions always use the TAGS file, but my Lisp 
skills are not enough. I found this snippet:

But it does not work. I does not find anything.

I wonder whether I could turn xref-etags-mode on globally. And whether that 
would be enough.

Thanks in advance,

reply via email to

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