unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Emacs 24 semantic C++ completion problem
@ 2011-12-29 18:32 Vyacheslav Gonakhchyan
  2011-12-29 22:03 ` Eric M. Ludlam
  0 siblings, 1 reply; 17+ messages in thread
From: Vyacheslav Gonakhchyan @ 2011-12-29 18:32 UTC (permalink / raw)
  To: emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 2222 bytes --]

Hi,

I have a problem with C++ completion via builtin semantic.
Environment: Linux 3.1.5, Emacs 24.0.92.1(latest bzr build), attached
config file.


I use command semantic-ia-complete-symbol and get confusing errors(I cut
the some line - they are too long):

*1)*
Debugger entered--Lisp error: (error "Cannot find types for `\"mCamera\"'")
signal(error ("Cannot find types for `\"mCamera\"'"))
error("Cannot find types for `%s'" "\"mCamera\"")
semantic-analyze-possible-completions-default([object
semantic-analyze-context...
semantic-analyze-possible-completions([object semantic-analyze-context
"context" (690 . 690) ("mCamera" "")...
semantic-ia-complete-symbol(690)
call-interactively(semantic-ia-complete-symbol nil nil)

*2)*
Debugger entered--Lisp error: (wrong-type-argument
semantic-find-tags-by-scope-protection parent semantic-tag-class type)
signal(wrong-type-argument (semantic-find-tags-by-scope-protection parent
semantic-tag-class type))
semantic-find-tags-by-scope-protection(protected ("WindowEventListener"
variable
semantic-analyze-scoped-type-parts(("WindowEventListener" variable (:type
("_OgreExport" type
...(table dump)
semantic-analyze-scoped-inherited-tag-map(("BaseApplication" type
(:superclasses...
Semantic-analyze-scoped-inherited-tag-map(("TutorialApplication" type
(:superclasses (("BaseApplication"
semantic-analyze-scoped-inherited-tags(("TutorialApplication" type
(:superclasses (("BaseApplication" type...
semantic-analyze-scoped-type-parts(("TutorialApplication" type
(:superclasses (("BaseApplication" type...
semantic-analyze-scoped-tags-default(nil [object semantic-scope-cache
"Cache" [object semanticdb-table "Tut.cpp"...
semantic-analyze-scoped-tags(nil [object semantic-scope-cache "Cache"
[object semanticdb-table "Tut.cpp"...
semantic-calculate-scope(685)
semantic-analyze-current-context-default(685)
semantic-analyze-current-context(685)
semantic-ia-complete-symbol(685)
call-interactively(semantic-ia-complete-symbol nil nil)

I'm trying to make completion work for C++ and I need your advice.
Debugging these errors for newbie such as myself is tedious:(
Also please answer if you know workaround. If you have a working .emacs
config - it might help too.

Thanks,
Slava

[-- Attachment #1.2: Type: text/html, Size: 2722 bytes --]

[-- Attachment #2: .emacs --]
[-- Type: application/octet-stream, Size: 2577 bytes --]

(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(ecb-options-version "2.40")
 '(ecb-primary-secondary-mouse-buttons (quote mouse-1--C-mouse-1))
 '(inhibit-startup-screen t)
 '(semantic-c-dependency-system-include-path (quote ("/usr/include" "/usr/include/OGRE" "/usr/include/OIS"))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(autoload 'php-mode "php-mode.el" "Php mode." t)
(setq auto-mode-alist (append '(("/*.\.php[345]?$" . php-mode)) auto-mode-alist))

;;Custom code
(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp/"))
(add-to-list 'load-path (expand-file-name "~/work/emacs/ecb/"))

;; cedet
(require 'semantic)
(require 'semantic/sb)
(require 'srecode)
(global-ede-mode 1)
(semantic-mode 1)
(global-semanticdb-minor-mode 1)
(global-semantic-idle-scheduler-mode 1)
(global-semantic-idle-completions-mode 1)
(global-semantic-decoration-mode 1)
(global-semantic-highlight-func-mode 1)
(global-semantic-stickyfunc-mode -1)
(global-semantic-idle-summary-mode 1)
(global-semantic-mru-bookmark-mode 1)
(semanticdb-enable-gnu-global-databases 'c-mode)
(semanticdb-enable-gnu-global-databases 'c++-mode)
(set-default 'semantic-case-fold t)


;; ecb
(setq stack-trace-on-error t) ;WA for void-variable error
(require 'ecb)

;;Turn Debug ON
(setq debug-on-error t)

;;CPP project
(ede-cpp-root-project "OgreTerrain"
                :name "OgreTerrain Project"
                :file "~/work/cpp/OgreTerrain/CMakeLists.txt"
				:include-path '("/")
                :system-include-path '("/usr/include/OGRE" 
				       "/usr/include/OGRE/Plugins"
				       "/usr/include/OGRE/Terrain"
				       "/usr/include/OIS")
              	)

;;semantic key bindings
(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 "\C-c>" 'semantic-complete-analyze-inline)
  (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle))
(add-hook 'c-mode-common-hook 'my-cedet-hook)

;(defun my-c-mode-cedet-hook ()
; (local-set-key "." 'semantic-complete-self-insert)
; (local-set-key ">" 'semantic-complete-self-insert))
;(add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2012-01-05  4:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-29 18:32 Emacs 24 semantic C++ completion problem Vyacheslav Gonakhchyan
2011-12-29 22:03 ` Eric M. Ludlam
2011-12-30  9:22   ` David Engster
2011-12-30 11:31     ` Vyacheslav Gonakhchyan
2011-12-30 11:57       ` David Engster
2011-12-30 15:00         ` Vyacheslav Gonakhchyan
2011-12-30 16:51           ` David Engster
2011-12-30 19:52             ` Vyacheslav Gonakhchyan
2011-12-30 20:06               ` David Engster
2011-12-30 21:14                 ` Vyacheslav Gonakhchyan
2011-12-30 22:22                   ` David Engster
2011-12-31  7:05                     ` Vyacheslav Gonakhchyan
2011-12-31 12:07                       ` David Engster
2011-12-31 12:16                         ` David Engster
2012-01-01 22:43                         ` Stefan Monnier
2012-01-02 19:33                           ` David Engster
2012-01-05  4:43                             ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

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

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).