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: Richard G Riley
Subject: Re: Emacs + cscope (xcscope.el)
Date: Fri, 12 Oct 2007 19:41:46 +0200
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50.6 (gnu/linux)

Thorsten Bonow <address@hidden> writes:

>>>>>> "Iakie" == Iakie  <address@hidden> 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> address@hidden:~/linux-source-2.6.22$ cscope -R -q -b
>     Iakie> address@hidden:~/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?


I use two scripts to use tags and cscope in conjunction with the oft
overlooked fact that the linux makefiles include makefiles with tags and
cscope targets : i just run "tags" .....

1) ~/bin/tags

,----
| #!/bin/bash
| cd ~/programming
| echo Calculating tags in ~/programming ...
| ctags-exuberant  -e --language-force=auto --recurse=yes --links=yes 
~/programming
| 
| cd /usr/src/linux
| echo Calculating tags in /usr/src
| make TAGS
| 
| ~/bin/makecs
| # echo Done!
`----

2) ~/bin/makecs

,----
| #!/bin/bash
| 
| SRC=/usr/src/linux
| 
| cd $SRC
| echo "CScoping Linux sources ....."
| make cscope
| 
| SRC=/home/rgr/programming
| 
| cd $SRC
| echo "CScoping ~/programming/c....."
| # find -L $SRC -name "*.[chxsS]" -o -iname \*.php -print > cscope.files
| find -L $SRC -name "*.[chxsS]" -print > cscope.files
| cscope -b -q -u
`----




reply via email to

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