From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Richard G Riley Newsgroups: gmane.emacs.help Subject: Re: Emacs + cscope (xcscope.el) Date: Fri, 12 Oct 2007 19:41:46 +0200 Message-ID: <5n9purFgtvkpU1@mid.uni-berlin.de> References: <1192125158.891481.309610@y42g2000hsy.googlegroups.com> <87przlz8zs.fsf@post.rwth-aachen.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192214566 15031 80.91.229.12 (12 Oct 2007 18:42:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 12 Oct 2007 18:42:46 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Oct 12 20:42:35 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IgPR7-0006Fa-My for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Oct 2007 20:40:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IgPR1-0004gH-2P for geh-help-gnu-emacs@m.gmane.org; Fri, 12 Oct 2007 14:40:31 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 84 Original-X-Trace: news.uni-berlin.de fIJa1Q1xa661Xo7Ku8y4ZQmeme0pnafcAWHBpse/s57LTrWpc= User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50.6 (gnu/linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:152865 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:48370 Archived-At: Thorsten Bonow writes: >>>>>> "Iakie" == Iakie 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? 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 `----