I use emacs semantic to auto-complete C language structure, but when I tag ">" (Message->) it show error "cannot analyze buffers not supported by semantic".
Google many times and I did not find any solution.
Debug Message:
Debugger entered--Lisp error: (error "Cannot analyze buffers not supported by Semantic")
signal(error ("Cannot analyze buffers not supported by Semantic"))
error("Cannot analyze buffers not supported by Semantic")
semantic-analyze-current-context()
byte-code("\301 \210^H\203^V^@\302 \204^Q^@\303 \203^V^@\304^H\305\"\210\306\207" [semantic-current-input-throw-symbol semantic-analyze-current-c$
byte-code("\212\302\211^X\303\215)?\205^X^@ \304U\205^X^@\302\211^X\305\215)?)\207" [semantic-current-input-throw-symbol arg csi (byte-code "\3$
semantic-complete-self-insert(1)
call-interactively(semantic-complete-self-insert nil nil)
Version:
CEDET Version: 1.1
Requested File Loaded
Package Version Version Version
----------------------------------------------------------
cedet: 1.1 ok ok
eieio: 1.4 ok ok
semantic: 2.1 ok ok
srecode: 1.1 ok ok
ede: 1.1 ok ok
speedbar: 1.0.4 ok ok
cogre: 1.1 ok Not Loaded
cedet-contrib: 1.1 ok Not Loaded
.emacs setting
(add-to-list 'load-path' "~/.emacs.d/company-mode"
"~/.emacs.d/cedet/common" )
(load "~/.emacs.d/cedet/common/cedet" nil t)
(autoload 'company-mode "company" nil t)
(setq company-idle-delay t)
(global-ede-mode 1)
(semantic-load-enable-code-helpers)
(global-srecode-minor-mode 1)
(add-to-list 'load-path
"~/.emacs.d/plugins")
(require 'yasnippet-bundle)
;;; semantic setup
;; (semantic-load-enable-minimum-features)
;; (semantic-load-enable-code-helpers)
;; (semantic-load-enable-gaudy-code-helpers)
(semantic-load-enable-excessive-code-helpers)
(semantic-load-enable-semantic-debugging-helpers)
(require 'eieio-opt)
;;; gcc setup
(require 'semantic-gcc)
;;; smart complitions setup
(require 'semantic-ia)
;;;
(defun my-cedet-hook()
(local-set-key [(control return)] 'semantic-ia-complete-symbol)
(local-set-key "\C-c?" 'semantic-ia-complete-symbol-menu)
(local-set-key (kbd "M-n") 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-c>" 'semantic-complete-analyze-inline)
(local-set-key (kbd "M-/") 'semantic-complete-analyze-inline)
(local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)
(local-set-key "\C-cd" 'semantic-ia-fast-jump)
(local-set-key "\C-cr" 'semantic-symref-symbol)
(local-set-key "\C-cR" 'semantic-symref)
;;; c/c++ setting
(local-set-key "." 'semantic-complete-self-insert)
(local-set-key ">" 'semantic-complete-self-insert))
(add-hook 'c-mode-common-hook 'my-cedet-hook)
Thank you!
You're using a horribly outdated CEDET. Just update to latest Emacs, or at least to 24.3. Then you can test with zero config:
M-x
semantic-mode
. After this,semantic-ia-complete-symbol
will bring up the appropriate popup.