help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Semantic Parsing of Python Symbols Defined in Class


From: Steve Jarvis
Subject: Semantic Parsing of Python Symbols Defined in Class
Date: Fri, 22 Jan 2016 12:40:58 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

Hi, I'm having trouble getting Semantic to find symbols defined within a Python class. For example, in the following buffer I can use "semantic-ia-fast-jump" to locate "say_hi()", but cannot find "thing_say_hi()".

<start code>

def say_hi():
    print 'hello there'

class Thing:

    def thing_say_hi(self):
        print 'hello from class'


say_hi()    # Resolves correctly with 'semantic-ia-fast-jump'
thing = Thing()
thing.thing_say_hi() # Could not find suitable jump point for thing_say_hi

<end code>

I look at semantic's context (what I understand fast jump uses to locate symbols) and see the prefix class is just "'type". I would expect that to be "Thing"?


Context Type: #<semantic-analyze-context context>
Bounds: (148 . 160)
Prefix: "thing_say_hi"
Prefix Classes: 'type


Anyway, this is on emacs 24.5.1 with no extra packages. I didn't find any info on this with a bit of Googling; it sounds like it really just works excellently for most. Any ideas what's going on? From what I've read of Semantic, this is certainly not outside the functionality of fast jump, is it?

Thanks,
Steve



reply via email to

[Prev in Thread] Current Thread [Next in Thread]