all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thorsten Bonow <thorsten.bonow@post.rwth-aachen.de>
Subject: Re: cscope
Date: Thu, 06 Jan 2005 18:51:41 +0100	[thread overview]
Message-ID: <874qhu4f9u.fsf@herrrossi.mmweg.rwth-aachen.de> (raw)
In-Reply-To: 1104983072.242740@sj-nntpcache-3

>>>>> "Ravi" == Ravi Uday <raviuday@gmail.com> 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

      reply	other threads:[~2005-01-06 17:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-04  4:56 cscope Ravi Uday
2005-01-04 12:34 ` cscope Thorsten Bonow
2005-01-06  3:39   ` cscope Ravi Uday
2005-01-06 17:51     ` Thorsten Bonow [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874qhu4f9u.fsf@herrrossi.mmweg.rwth-aachen.de \
    --to=thorsten.bonow@post.rwth-aachen.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.