Hi

Does this complete .emacs, or there is something that is loading before this? standalone CEDET should be loaded at first lines of .emacs

On Fri, Dec 28, 2012 at 8:45 AM, Balaji Venkataraman <balaji.s.venkataraman@gmail.com> wrote:
Hi,

This is my first time trying to use cedet. I'm using GNU Emacs 24.2.1
on Linux. I'm using a latest version of cedet cloned from the bzr repo
(rev: 8426?). I spent a lot of time going through Alex Ott's intro and
I also took chunks of Alex's .emacs for cedet from here
(https://github.com/alexott/emacs-configs/blob/master/rc/emacs-rc-cedet.el).
But I'm still having problems. Whenever I open a c/cpp file, I get an
error (debug trace below). I've also pasted my .emacs settings further
below. Any/all help appreciated. Thanks!

Debugger entered--Lisp error: (wrong-type-argument stringp 1)
  string-match("\n" 1 0)
  split-string(1 "\n")
  semantic-cpp-defs(1)
  semantic-gcc-setup()
  byte-code("  \306\307 BC\310\311#\210\312\313\311\"\210       \210)\314\307\311  \315 !\316  \n\2047
  semantic-default-c-setup()
  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 d.C>
#<buffer  *Minibuf-1*>))
  mode-local-post-major-mode-change()
  run-hooks(find-file-hook)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer d.C> "~/bin/d.C" nil nil "~/bin/d.C"
(1285 2052))
  find-file-noselect("~/bin/d.C" nil nil t)
  ad-Orig-find-file("~/bin/d.C" t)
  (setq ad-return-value (ad-Orig-find-file filename wildcards))
  (let (ad-return-value) (setq ad-return-value (ad-Orig-find-file
filename wildcards)) ad-return-value)
  find-file("~/bin/d.C" t)
  call-interactively(find-file nil nil)

My .emacs settings:
;; load local cedet
;;(load-file "~/usr/elisp/cedet-1.1/common/cedet.el")
(load-file "~/usr/elisp/cedet-bzr/cedet-devel-load.el")
(add-to-list 'load-path "~/usr/elisp/cedet-bzr/contrib/")
;;(load-file "~/usr/elisp/cedet-bzr/contrib/cedet-contrib-load.el")
;;(semantic-load-enable-excessive-code-helpers)
(add-to-list 'Info-directory-list "~/usr/elisp/cedet-bzr/doc/info")

(setq semantic-default-submodes
      '(global-semantic-highlight-func-mode
        global-semantic-decoration-mode
        global-semantic-stickyfunc-mode
        global-semantic-idle-completions-mode
        global-semantic-idle-scheduler-mode
        global-semanticdb-minor-mode
        global-semantic-idle-summary-mode
        global-semantic-mru-bookmark-mode
        global-cedet-m3-minor-mode
        global-semantic-show-unmatched-syntax-mode
        global-semantic-show-parser-state-mode
        global-semantic-highlight-edits-mode))
(semantic-mode 1)
(require 'semantic/ia)
;;(require 'semantic/c)
(require 'semantic/bovine/gcc)
(require 'semantic/sb)
(setq-mode-local c-mode semanticdb-find-default-throttle
                 '(project unloaded system recursive))

(defun my-semantic-hook ()
  (imenu-add-to-menubar "TAGS"))
(add-hook 'semantic-init-hooks 'my-semantic-hook)

(defun my-cedet-hook ()
  (local-set-key [(control return)] 'semantic-ia-complete-symbol-menu)
  (local-set-key "\C-c?" 'semantic-ia-complete-symbol)
  ;;
  (local-set-key "\C-c>"
'semantic-comsemantic-ia-complete-symbolplete-analyze-inline)
  (local-set-key "\C-c=" 'semantic-decoration-include-visit)

  (local-set-key "\C-cj" 'semantic-ia-fast-jump)
  (local-set-key "\C-cq" 'semantic-ia-show-doc)
  (local-set-key "\C-cs" 'semantic-ia-show-summary)
  (local-set-key "\C-cp" 'semantic-analyze-proto-impl-toggle)
;; (local-set-key (kbd "C-c <left>") 'semantic-tag-folding-fold-block)
;; (local-set-key (kbd "C-c <right>") 'semantic-tag-folding-show-block)
  (add-to-list 'ac-sources 'ac-source-semantic)
  )

(add-hook 'c-mode-common-hook 'my-cedet-hook)
(add-hook 'emacs-lisp-mode-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)

;; for auto-complete package
(require 'auto-complete-config)
(add-to-list 'ac-dictionary-directories "~/usr/elisp/ac-dict")
(ac-config-default)

(defun my-c-mode-cedet-hook ()
  (add-to-list 'ac-sources 'ac-source-gtags)

)
(add-hook 'c-mode-common-hook 'my-c-mode-cedet-hook)

;; loading contrib...
;; (require 'semantic-tag-folding)
;; (global-semantic-tag-folding-mode 1)


;; for EDE mode
(global-ede-mode t)

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
cedet-semantic mailing list
cedet-semantic@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cedet-semantic



--
With best wishes,                    Alex Ott
http://alexott.net/
Twitter: alexott_en (English), alexott (Russian)
Skype: alex.ott