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

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

Re: Emacs + cscope (xcscope.el)


From: Thorsten Bonow
Subject: Re: Emacs + cscope (xcscope.el)
Date: Thu, 11 Oct 2007 22:33:59 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.20 (linux)

>>>>> "Iakie" == Iakie  <accelas@gmail.com> writes:

Hi,

    Iakie> I edited my .emacs like this: Code:

    Iakie> (load-file "/usr/share/emacs/site-lisp/xcscope.el") (require
    Iakie> 'xcscope)

you should take a look at the installation instructions at the beginning of the
file. In your case, since you put "xcscope.el" in "/usr/share/emacs/site-lisp/",
the

        (require 'xcscope)

should be enough. The directory should be in your `load-path', where emacs looks
for lisp files (you can check with "C-h v load-path")

You missed the part where you should install the indexer-script. I would do this
and try everything from within emacs---it is supposed to work.

    Iakie> Then, I untar-ed linux kernel in my home folder, under which I ran
    Iakie> cscope to generate search database. And I tried to edit some files

    Iakie> Code:

    Iakie> me@box:~/linux-source-2.6.22$ cscope -R -q -b
    Iakie> me@box:~/linux-source-2.6.22$ emacs kernel/time.c

You must specify the initial directory in the cscope menu, but even then this
will fail...

    Iakie> When I tried to find symbol definition using C-c s d, it returns no
    Iakie> matched result

... yup, same here. Works if you let xcscope create the index. Again, you must
install the cscope-indexer script *first*.

    Iakie> Can someone tell me what I did wrong?

This is a FAQ, happens all the time when people try to call cscope manually and
then make xcscope.el work with the manually created database. The problem arises
because xcscope.el expects a database created with a file list and not by a call
with recursion turned on.

xcscope.el fails too when you specify the "-k" switch for "kernel mode" (as you
should have done)" So in your case you should let cscope-indexer do the job from
within emacs and xcscope.el.

For ages I'm thinking of modifying xcscope.el so that it calls cscope directly
(this would make it possible to use it under Windoze without having a bash shell
for calling the indexer script installed).

Haven't gotten around to it yet. Someone out there to beat me to it?

Hope this helps.

Toto


-- 
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow

At Tom Baker's wake, quite well attended, as the wakes and
funerals of misunderstood people usually are, I sang `Ride 'em
Jewboy.' The song is a western translation of what is essentially
an eastern experience, the holocaust. It is not surprising that
this song had been a favorite of Bakers's. As Brendan Behan said:
`The Irish and the Jews do not share a nation; they share a
psychosis.'

Kinky Friedman: Elvis, Jesus and Coca-Cola


reply via email to

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