Some success with Emacs 23.2 (win) + ECB

"Thomas I. Burbage" <[email protected]> Sun, 08 Aug 2010 22:36:04 -0700
Newsgroups gmane.emacs.code-browser
Message-ID <[email protected]>
Since people's experience seems to be all over the map regarding getting 
a working ECB environment going in Emacs 23.2, I thought I would share 
what's working for me so far. I'm using the CVS stable snapshot of ECB 
and *not* the one you would get by default. See the "Latest 
CVS-snapshot" link on the ECB Downloads page 
(http://ecb.sourceforge.net/, Downloads).

My simple current configuration is:
(require 'ecb)
(add-hook 'ecb-before-activate-hook
           (function
            (lambda ()
              (global-ede-mode 1)
              ;; Enable semantic. Causes the "Development" main menu to 
be added.
              (semantic-mode 1)
              ;; If enabled, semantic inserts lines in the code buffer 
above the tags
              ;; it is tracking, and highlights things like #includes 
(dflt=nil)
              (global-semantic-decoration-mode 1)
              ;; dflt=nil
              (global-semantic-highlight-func-mode 1)
              ;; dflt=nil
              (global-semantic-idle-completions-mode 1)
              ;; dflt=nil
              (global-semantic-idle-tag-highlight-mode 1)
              ;; dflt=nil
              (global-semantic-show-parser-state-mode 1)
              ;; dflt=nil
              (global-semantic-show-unmatched-syntax-mode 1)
              (setq ecb-bucket-node-display '("[" "]" ecb-bucket-node-face))
              ))
           )

This generally works fine, though I should mention I'm just getting 
started with ECB, semantic, etc. so can't confirm the 
"bells-and-whistles" are all working.

I think there are some unresolved issues when the the active buffer 
contains a non-semantic-supported file type.
Others have mentioned this error:
ecb-create-non-semantic-tree: Attempt to modify read-only object
Oddly, I get that when I visit an elisp file, though I thought semantic 
supported parsing elisp... The functions in the elisp module definitely 
aren't getting populated into the ECB methods buffer. If an elisp file 
happens to be the active buffer when I activate ECB, ECB appears to fail 
to fully initialize properly and reports that error (at any rate, the 
ECB layout/panes do not appear).

A second problem I've experienced was that when trying to use the 
lighter weight (require 'ecb-autoloads) instead of the full (require 
'ecb), when ecb is activated the graphical icons for directories tree, 
etc. do not display. Since that hinted to me that initialization hadn't 
really happened correctly, I switched to the full require.

For those trying to copy/paste from others' examples to get a working 
configuration, be careful to note whether they were using Emacs 23.2 
with the built-in CEDET vs. say Emacs 23.1 and an "external" CEDET. Some 
of that configuration is no longer supported with the built-in 
implementation, for example:

(semantic-load-enable-minimum-features)
(semantic-load-enable-code-helpers)

Hope this helps somebody else to get off to a good start.

-Tom




------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev