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

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

Re: Source code navigation in emacs


From: Anselm Helbig
Subject: Re: Source code navigation in emacs
Date: Wed, 08 Jul 2009 10:00:46 +0200

At Tue, 7 Jul 2009 16:53:31 -0700,
n179911 <n179911@gmail.com> wrote:
> 
> On Tue, Jul 7, 2009 at 2:29 PM, Dirk-Jan C. Binnema<djcb.bulk@gmail.com> 
> wrote:
> >
> > Hi,
> >
> >>>>>> "n179911" == n179911  <n179911@gmail.com> writes:
> >
> >
> >    >>> Can someone please recommend what is the way to setup code 
> > navigation
> >    >>> in emacs?  I have setup xcope.el with cscope run in emacs.
> >    >>>
> >    >>> But I read here, it said some thing about gnu global with emacs?
> >    >>> 
> > http://emacs-fu.blogspot.com/2009/01/navigating-through-source-code-using.html
> >
> >
> >    >> The most generic way is to just use a tags table, see the manual:
> >
> >    >> etags supports more languages than gnu global, and there is an
> >    >> etags program coming with exuberant-ctags that supports even
> >    >> more. There are alternative, more capable solutions for specific
> >    >> programming languages. What are you working with?
> >
> > Anselm, is there any reason to prefer etags over GNU-Global for C/C++? I am
> > quite happy with GNU-Global (I actually wrote the above blogpost) -- in what
> > way would etags be better?
> >
> 
> And can you please help me understand why GNU-Global is better than
> xcope.el + cscope for emacs?

As I said, using tags tables is the most generic approach. Support for
it has been in emacs for a long time. Any installation of emacs should
also come with the etags program, which supports many different
languages, compare:

  cscope 
    C, C++

  global
    C, C++, Yacc, Java and PHP4
    
  etags (emacs 23)
    C, Objective C, C++, Java, Fortran, Ada, Cobol, Erlang, Forth, HTML,
    LaTeX, Emacs Lisp/Common Lisp, Lua, Makefile, Pascal, Perl, PHP,
    Postscript,  Python, Prolog, Scheme and most assembler-like syntaxes

  etags (exuberant)
    Asm, Asp, Awk, Basic, BETA, C, C++, C#, Cobol, Eiffel, Erlang,
    Fortran, HTML, Java, JavaScript, Lisp, Lua, Make, Pascal, Perl, PHP,
    Python, REXX, Ruby, Scheme, Sh, SLang, SML, SQL, Tcl, Vera, Verilog,
    Vim, YACC

It doesn't do fancy stuff, e.g. keeping an index of function
references. That's the kind of thing gnu global and cscope can do for
you, if you're working with a language that they support.

I'm using ruby and javascript at the moment, so I don't have a real
alternative. I should look at CEDET again, though. 8-)

HTH, 

Anselm


-- 
Anselm Helbig 
mailto:anselm.helbig+news2009@googlemail.com


reply via email to

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