From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: Emacs + cscope (xcscope.el) Date: Thu, 11 Oct 2007 22:33:59 +0200 Message-ID: <87przlz8zs.fsf@post.rwth-aachen.de> References: <1192125158.891481.309610@y42g2000hsy.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1192135243 30206 80.91.229.12 (11 Oct 2007 20:40:43 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 11 Oct 2007 20:40:43 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Oct 11 22:40:40 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 1Ig4pg-0003lD-Js for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2007 22:40:36 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ig4pa-0005z3-M3 for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Oct 2007 16:40:30 -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!news.dfncis.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 73 Original-X-Trace: news.dfncis.de VIikFTTUiZX1FOXnZId3zwXfryxvCfetwX++keI025Vny8+1ssKUq2GxNG Cancel-Lock: sha1:lucZPTRdGSpuvmwvXdw8p4PDqK8= sha1:ahBdsJXFdzR/s1/Tbyv7cjv46ok= User-Agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.20 (linux) Original-Xref: shelby.stanford.edu gnu.emacs.help:152843 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:48343 Archived-At: >>>>> "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? 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