* cscope
@ 2005-01-04 4:56 Ravi Uday
2005-01-04 12:34 ` cscope Thorsten Bonow
0 siblings, 1 reply; 4+ messages in thread
From: Ravi Uday @ 2005-01-04 4:56 UTC (permalink / raw)
Hi,
I am unable to use cscope with emacs.
I was able to load the cscope.el file, but on searching
it fails to display any results (says cscope: 0 lines).
How does one specify the path to cscope.out file.
Similar case with gid too.
Thanks,
Ravi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cscope
2005-01-04 4:56 cscope Ravi Uday
@ 2005-01-04 12:34 ` Thorsten Bonow
2005-01-06 3:39 ` cscope Ravi Uday
0 siblings, 1 reply; 4+ messages in thread
From: Thorsten Bonow @ 2005-01-04 12:34 UTC (permalink / raw)
>>>>> "Ravi" == Ravi Uday <raviuday@gmail.com> writes:
Ravi> Hi, I am unable to use cscope with emacs. I was able to load the
Ravi> cscope.el file, but on searching it fails to display any results (says
Ravi> cscope: 0 lines). How does one specify the path to cscope.out file.
I have to guess because you do not give more information:
- The cscope database has to be in the same directory or you have to tweak
`cscope-master-info-table' as described in the documentation.
- You're using xcscope (it's in the contrib subdirectory of the cscope sources)
and not cscope (which I think you should anyway!). Is the cscope-indexer
script in your path? If not, xcscope wasn't properly installed for your Emacs.
If you work on Windoze, you need a bash shell to make this script work. I used
to use it with Cygwin. Googling will give you some hints.
So I would switch to xcscope and if you tell me more, I'll try to help...
Ravi> Similar case with gid too.
What's that?
There is also GNU Global...
Toto
--
Contact information and PGP key at
http://www-users.rwth-aachen.de/thorsten.bonow
He looked a shade too healthy and nobody likes that. Particularly in
New York.
Friedman, Kinky (1993), Greenwich Killing Time. New York (Wings
Books), 42
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cscope
2005-01-04 12:34 ` cscope Thorsten Bonow
@ 2005-01-06 3:39 ` Ravi Uday
2005-01-06 17:51 ` cscope Thorsten Bonow
0 siblings, 1 reply; 4+ messages in thread
From: Ravi Uday @ 2005-01-06 3:39 UTC (permalink / raw)
Thorsten Bonow wrote:
>>>>>>"Ravi" == Ravi Uday <raviuday@gmail.com> writes:
>
>
> Ravi> Hi, I am unable to use cscope with emacs. I was able to load the
> Ravi> cscope.el file, but on searching it fails to display any results (says
> Ravi> cscope: 0 lines). How does one specify the path to cscope.out file.
>
> I have to guess because you do not give more information:
>
> - The cscope database has to be in the same directory or you have to tweak
> `cscope-master-info-table' as described in the documentation.
>
I am using just cscope and dont have xcscope.
Actually the question is
After you have built the cscope files and invoked the emacs21 from there,
what is the process/procedure to load a cscope file into emacs (may be
in .emacs)
and set any env/path variables if any
> - You're using xcscope (it's in the contrib subdirectory of the cscope sources)
> and not cscope (which I think you should anyway!). Is the cscope-indexer
> script in your path? If not, xcscope wasn't properly installed for your Emacs.
>
> If you work on Windoze, you need a bash shell to make this script work. I used
> to use it with Cygwin. Googling will give you some hints.
>
> So I would switch to xcscope and if you tell me more, I'll try to help...
>
> Ravi> Similar case with gid too.
>
> What's that?
>
> There is also GNU Global...
>
> Toto
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: cscope
2005-01-06 3:39 ` cscope Ravi Uday
@ 2005-01-06 17:51 ` Thorsten Bonow
0 siblings, 0 replies; 4+ messages in thread
From: Thorsten Bonow @ 2005-01-06 17:51 UTC (permalink / raw)
>>>>> "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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-01-06 17:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` cscope Thorsten Bonow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).