Re: [ECB-list] ECB 2.40 released!

<[email protected]> Tue, 19 May 2009 18:38:52 +0200
Newsgroups gmane.emacs.cedet,gmane.emacs.code-browser
Message-ID <[email protected]>
Well, then it#s clear - seems that python is not supported by semantic (but AFAIK current semantic has a python parser?! Eric?)
But if (semantic-active-p) is nil then semantic is not active...
What is the value of python-mode-hook in your setup??

Background: when semantic is not active then ECB can only uses etags or imenu-parser for the contents which is much much much less powerful then semantic-parser - with non-semantic-sources content display is quite rough in ECB because these parsers (etags and imenu) can not supply what ECB needs .... This is the reason for your expanding/collapsing problem...

So, here my recipe: Activate the semantic-python-parser for your code and bob will be your uncle ;-)

Klaus

-----Ursprüngliche Nachricht-----
Von: Don Dwiggins [mailto:[email protected]] 
Gesendet: Dienstag, 19. Mai 2009 18:26
An: [email protected]
Betreff: Re: [ECB-list] ECB 2.40 released!

[email protected] wrote:
> 1. please always send a problem-report with the command 
> `ecb-submit-problem-report' - this includes all informations i need

Thanks for the reply; here 'tis:
---------------------------------------

Please enter the details of your bug report here:

When I first load a Python file (or JS file, or...) after activating, the methods buffer is empty.  I can get it to fill in the methods by doing M-x python-mode (which is redundant, the mode is already set in the buffer), or by setting the scratch buffer to python-mode before loading the file.  (I also ran into this problem earlier using ECB 2.32 with CEDET 1.0pre4.)

Answering your questions:
2. is semantic enables in your python-buffers (what does
(semantic-active-p) return if you call this with M-:)?
  It returns nil

3. Is semantic-idle-scheduler-mode active in your buffer?
I don't think so; in fact, the Senator menu item doesn't show up until I invoke python-mode.

4. What happens if you co not call pythom-mode but [C-c . r] or even [C-u][C-c . r]?
  Nothing.

One other thing: when I invoked python-mode, I noticed the following in the Messages buffer:
Cache Error: 
[c:/Unix/.semanticdb/!drive_c!Dwig!Falcon!Development!Online!RCAServer!semantic.cache]
(invalid-read-syntax . in wrong context), Restart [2 times] ... but it didn't seem to hurt anything.

5. Collapsing: Hmm, maybe you should build up a small example file which you send to me and a step-by-step sceanrio what i must do, to reproduce the behavior (beginning with 1. Start Emacs, 2. activate
ECB...!)

OK:
1) paste the following into a file:
-------------------------------
class foo:
     def __init__(self):
         pass

     def foo1(self):
         pass

     def foo2(self):
         pass

class bar:
     def __init__(self):
         pass

     def bar1(self):
         pass

     def bar2(self):
         pass
-------------------------------
2) start Emacs,
3) activate ECB
4) load the file
5) do what you must to populate the methods buffer ;^)
6) in the methods buffer, collapse the "foo" class
7) move the cursor to the bottom of the file, hit Return

... at this point, after a short delay, I see "foo" expand.
(In fact, any change to the file will make it happen.)


Emacs  : GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600)
  of 2008-09-06 on SOFT-MJASON
Package: ECB: 2.40, CEDET: 1.0pre6, semantic: 2.0pre6, eieio: 1.2,
speedbar: 1.0.2, JDEE: No JDEE

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects