3

I installed cscope-15.8a successfully and then I copied the cscope folder into .emacs.d/. I also add the following lines into the .emacs file:

(add-to-list 'load-path "~/.emacs.d/cscope/contrib/xcscope/")
(require 'xcscope)
(setq cscope-do-not-update-database t)

When I open a C++ file, find a function and then press C-c s d, a line prompt at the bottom:

Searching for program: No such file or directory, cscope

What's the reason for this?

2 Answers 2

2

Probably binary package cscope not installed or not in the emacs PATH.

This can be checked in emacs by M-:

(getenv "PATH")

To change path you can use setenv, e.g.:

(setenv "PATH" (concat (getenv "PATH") ":/opt/cscope/bin"))
1
  • You are correct, thanks so much, @iNode . And btw, when I exec the command you gave, I found that the Emacs PATH doesn't include the cscope path. So, how to add additional bin/ folders to the Emacs PATH?
    – injoy
    Sep 23, 2013 at 14:48
1

For emacs (Emacs 24.3.1) in my Mac setting PATH didn't solve the problem of not finding cscope. Instead, I had to add the following in .emacs:

(setq exec-path (append '("/usr/local/bin") exec-path))

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .