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

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

Re: How to use etags-select


From: Rafal Kurcz
Subject: Re: How to use etags-select
Date: Sat, 01 Sep 2007 05:05:21 -0700
User-agent: G2/1.0

On 27 Lip, 20:35, Scott Frazer <scfra...@cisco.com> wrote:
> Rafal Kurcz wrote:
> > Now the numbering of tags is very, very useful. Below are my
> > conclusions about using etags-select:
> > 1. It is very nice that it takes advantage of searchable mini buffer -
> > especially in case of the long list of tags.
>
> Yes
>
> > 2. How to force etags-select to be case-sensitive.
> >   I've setup (setq tags-case-fold-search nil) and it works for M-. but
> > unfortunately it does not work in etags-select.
> >   It is very important when browsing C/C++ code.
>
> Fixed, see EmacsWiki.
>
>
>
> > 3. It would be very nice to show more information in the list of tags.
> >   For example VIM uses the following format to show the list of tags
> > generated by "exuberent-ctags -R":
>
> >  # pri kind tag               file
> >   1 FSC m    speed             class.cpp
> >                struct:Plane
> >                int speed;
> >   2 FSC f    speed             class.cpp
> >                class:Car
> >                void speed () {return;}
> >   3 F C f    speed             class.cpp
> >                struct:Bike
> >                int speed () {return 10;}
> >   4 F C f    speed             class.cpp
> >                char speed (char c) {return c;}
> > Choice number (<Enter> cancels):
>
> [snip]
>
> > I can see that it works partially for TAGS generated by etags from
> > emacs but does not work for TAGS generated by "exuberent-ctags -e -R".
> > I guess that for the sake of convinience it is better to have each tag
> > description in a single line.
>
> I can't really do much about this, I can only work with what etags and
> exuberant-ctags generates.  etags adds namespace information for c++ code,
> which I show as part of the tag name.  exuberant-ctags just puts in the
> unqualified tag.  You can add the 'extra' option:
>
> ctags --extra=q -e -R
>
> which will include the namespace info, but it keeps the original tag also;
> i.e. you get double entries for most tags, both pointing to the same line
> of code.  If it really bugs you, it would be pretty easy to post-process
> the TAGS file and remove the duplicates (left as an exercise for the
> student).
>
> Scott

Great thanks for help Scott.
Sorry for bothering you again but I think I found another weak point
of etags-select.
I started using it with the linux kernel's latest source tree.
I generated the TAGS file:
exuberant-ctags -R -e

The size of TAGS file is 54 MB.

Locating the tag with:
etags-select-find-tag-at-point

takes about 10s on Pentium 4 2.4 GHz.
It takes about 15s when loading the TAGS table for the first time.

Using the M-. takes about 0.5 s that is quite acceptable

I did the test with Vim.
I generated the tags table with:
exuberant-ctags -R

The size of tags file is 74 MB (37% larger than emacs TAGS table).
Vim is extremely fast when locating all the tags and showing the
choice list.
It takes much less than 0.5s.

Do you have any idea why etags-select works so slowly ?

Thank You for help.



reply via email to

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