dr_pepper
dr_pepper

Reputation: 1587

What is the best way to navigate duplicate tag definitions in Emacs?

Within emacs, what are the best options out there for navigating to a specific function whose name might show up across several different files? Within etags, you are only allowed to cycle through the tags one-at-a-time which could take a while if the function name you are looking for is popular.

Upvotes: 6

Views: 694

Answers (4)

Drew
Drew

Reputation: 30699

  1. Icicles tag commands

    In particular, use command icicle-find-tag, to do what all of these vanilla commands do:

    • find-tag (M-.) to find a tag
    • tags-loop-continue (M-,) to find another matching tag
    • tags-apropos to list all tags that match a regexp
    • list-tags to show all tags (definitions) in a given source file.

    icicle-find-tag is a general tags browser: being a multicommand, you can visit any number of tags, in any order, in a single invocation.

  2. Icicles imenu -- Imenu across files or buffers. Search within selected function definitions (as the search contexts).

Upvotes: 0

scottfrazer
scottfrazer

Reputation: 17327

Etags-select:

http://www.emacswiki.org/cgi-bin/wiki/EtagsSelect

Upvotes: 3

Rajish
Rajish

Reputation: 6805

If your programming language is C then cscope is much better than etags. It presents you with an interactive list of a symbol instances with its context. More info is in this answer

Upvotes: 1

link0ff
link0ff

Reputation: 2774

C-u M-. cycles all locations of the same tag, but if you want to see a list of all tags that match your function name you can use the command tags-apropos.

Upvotes: 5

Related Questions