Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jedi:goto-definition takes me to import statement, not class definition #215

Closed
ghost opened this issue Mar 27, 2015 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Mar 27, 2015

On pressing

M-x jedi:goto-definition

for a symbol, jedi takes me to the import statement in the current module. when i again say jedi:goto-definition, it takes me to the definition statement. But, i would like to do this in one shot. Is there a confiiguration parameter that i can use to skip tagging import statements?

@syohex
Copy link
Collaborator

syohex commented May 11, 2015

Sorry very too late reply.
Please try C-u C-u M-x jedi:goto-definition.

@ghost
Copy link
Author

ghost commented May 16, 2015

thanks Syohex, it works. Earlier, i was pressing just Alt - . and now this new key sequence is kind of complex for me. So, i tried to figure out the code flow inside jedi-core#jedi:goto-definition by putting
log statements --- (message "...."). But those statements are not printed in my message buffer (C-h e). Why is it so?
And in jedi:goto-definition-config, there are four key sequences given as,

    (setq jedi:goto-definition-config
          '((nil nil        nil)        ; C-.
            (t   nil        nil)        ; C-u C-.
            (nil definition nil)        ; C-u C-u C-.
            (t   definition nil)        ; C-u C-u C-u C-.
            ...))

How does no prefix argument, prefix argument as 4, or 16, or 64 affect the goto-definition behaviour?

@immerrr
Copy link
Collaborator

immerrr commented Nov 7, 2018

It means that:

  • if you press C-., it will run (jedi:goto-definition nil nil nil)
  • if you press C-u C-., it will run (jedi:goto-definition t nil nil)
  • for C-u C-u C-., it will run (jedi:goto-definition nil 'definition nil)

And so on...

To do what is requested in the original request you can follow the part about "follow substitution path" from this doc: http://tkf.github.io/emacs-jedi/latest/#jedi:goto-definition-config

@immerrr immerrr closed this as completed Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants