From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thorsten Bonow Newsgroups: gmane.emacs.help Subject: Re: cscope Date: Thu, 06 Jan 2005 18:51:41 +0100 Message-ID: <874qhu4f9u.fsf@herrrossi.mmweg.rwth-aachen.de> References: <1104814885.906655@sj-nntpcache-3> <87ekh1fk4r.fsf@herrrossi.mmweg.rwth-aachen.de> <1104983072.242740@sj-nntpcache-3> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1105034026 9206 80.91.229.6 (6 Jan 2005 17:53:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 6 Jan 2005 17:53:46 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 06 18:53:37 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CmbpJ-0003zT-00 for ; Thu, 06 Jan 2005 18:53:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cmc0c-0005Tf-ES for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Jan 2005 13:05:18 -0500 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: 87 Original-X-Trace: news.dfncis.de 3TdbCZOKMQlR7jqmoX8kLQsl36y02ZWVCeF5Dir3NMI7zjCbTg8s3XFO4M User-Agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Security Through Obscurity, linux) Cancel-Lock: sha1:lQKUIESBid4QybpfrFwswAXMCNg= Original-Xref: shelby.stanford.edu gnu.emacs.help:127708 Original-To: help-gnu-emacs@gnu.org 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: main.gmane.org gmane.emacs.help:23176 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23176 >>>>> "Ravi" == Ravi Uday writes: Ravi> I am using just cscope and dont have xcscope. Actually the question Ravi> is After you have built the cscope files and invoked the emacs21 from Ravi> there, what is the process/procedure to load a cscope file into emacs Ravi> (may be in .emacs) and set any env/path variables if any Hi! Let's do it step by step: For your Emacs initialisation file: ;; (add-to-list 'load-path "/directory/where/you/put/your/cscop.el-library") (require 'cscope) ;; You can omit the first line if you have put cscope.el into a directory already in your load-path, e.g. a site-lisp directory. Don't forget to byte-compile it for faster loading and execution... So now I have put this example C file "test.c" into directory "~/42" /* test.c */ main () { } /* test.c */ Then I can call the cscope program: ~/42 $ cscope ./test.c That produces a "cscope.out" file. Now if you open your emacs with ~/42 $ emacs ./test.c You can put the cursor on "main" and call M-x cscope-find-c-symbol cscope.el now proposes to look for "main" (not a very useful example, I know :-), press return and voila, a buffer opens which tells you that Find this C symbol: main cscope: 1 lines test.c main 1 main () { >> You can get help on other functions in the package by C-h f cscope- and then pressing TAB to get the a list of functions in the package, e.g. cscope-find-all cscope-find-c-symbol cscope-find-egrep-pattern cscope-find-file cscope-find-files-including cscope-find-functions-called cscope-find-functions-calling cscope-find-global-definition cscope-find-grep-pattern cscope-find-text-string But they simple let you get access to cscope functionality from within Emacs... Ravi> I am using just cscope and dont have xcscope. As I have mentioned before: xcscope is normally included in the cscope package. So very likely you have it. I prefer it to plain cscope.el. But YMMV... Hope this helps... Toto -- Contact information and PGP key at http://www-users.rwth-aachen.de/thorsten.bonow Now I have a cat. Well, that's not quite accurate. A cat and I have each other. Friedman, Kinky (1993), When the cat's away. New York (Wings Books), 421