1

Emacs noob here, For some reason, when I try to

  1. Open a existing C++ file
  2. Create a new C++ file

emacs tells me: "Searching for program: no such file or directory, global", but when I retry it works... not sure where to start to look for the problems. My ~/.emacs

EDIT: I found something similar here but doesn't have a definite answer.

But, this is what I get when I do a stacktrace:

Debugger entered--Lisp error: (file-error "Searching for program" "no such file or directory" "global")

  call-process("global" nil #<buffer *CEDET Global*> nil "-pq")
  apply(call-process "global" nil #<buffer *CEDET Global*> nil "-pq")
  cedet-gnu-global-call(("-pq"))
  cedet-gnu-global-root()
  (if (cedet-gnu-global-root) (setq semanticdb-project-system-databases (cons ... semanticdb-project-system-databases) semanticdb-find-default-throttle (append semanticdb-find-default-throttle ...)) (if dont-err-if-not-available nil (error "No Global support in %s" default-directory)))

 semanticdb-enable-gnu-global-in-buffer(t)

 semanticdb-enable-gnu-global-hook()

 run-hooks(semantic-init-mode-hook)

 semantic-new-buffer-fcn()

 run-hooks(mode-local-init-hook)

 #[nil "\300 \210\301\302!\207" [activate-mode-local-bindings run-hooks mode-local-init-hook] 2]()

 mode-local-map-file-buffers(#[nil "\300 \210\301\302!\207" [activate-mode-local-bindings run-hooks mode-local-init-hook] 2] #[nil "    =?\207" [mode-local--init-mode major-mode] 2] (#<buffer visualizer.cpp>))

 mode-local-post-major-mode-change()

 run-hooks(find-file-hook)

 after-find-file(nil t)

 find-file-noselect-1(#<buffer visualizer.cpp> ~/Documents/visualizer.cpp" nil nil "~/Documents/visualizer.cpp" (11403418 2054))
 find-file-noselect("~/Documents/visualizer.cpp" nil nil t)
 find-file("~/Documents/visualizer.cpp" t)
 call-interactively(find-file nil nil)

Community
  • 1
  • 1
Anil CR
  • 303
  • 2
  • 8

1 Answers1

3

Does it only happen with C++-files?

;; gnu global support
(require 'semanticdb-global)
(semanticdb-enable-gnu-global-databases 'c-mode)
(semanticdb-enable-gnu-global-databases 'c++-mode)

The error seems to indicate that GNU Global isn't found in your path.

flesk
  • 7,439
  • 4
  • 24
  • 33