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

edts-find-source-under-point does not find local functions... #32

Closed
qoocku opened this issue Nov 27, 2012 · 17 comments
Closed

edts-find-source-under-point does not find local functions... #32

qoocku opened this issue Nov 27, 2012 · 17 comments

Comments

@qoocku
Copy link

qoocku commented Nov 27, 2012

... which is weird 'cause edts-find-local-function works just fine.

@tjarvstrand
Copy link
Collaborator

Yes, that is weird. Do you get an error message?

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

*Messages* buffer sayes:

ferl-search-function: function foo/1 not found

when looking for local foo/1 function.

@tjarvstrand
Copy link
Collaborator

Nice! That sounds like an actual bug:) Would it be possible for you to provide a minimal working example to reproduce the bug? What do the clauses of foo/1 look like?

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

Hmm, I can describe it, sure, but the problem is that ANY local function is not found. Simply like that. No matter it's exported or not. Any arity. Any name.

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

Ok, it may be a clue: personally I put SPACE after function name, like this:

foo (...) ->
   ...

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

Yep. This is it. The SPACE... Removed and search worked. But, it's still a bug ;)

@tjarvstrand
Copy link
Collaborator

Should be fixed now. Thanks for your time!

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

Let me guess: the bug still exists for local functions with space after name AND arity /= 1? ;)

In my case, when the cursor is on "foo/1" the function will find "foo/0" definition.

@tjarvstrand
Copy link
Collaborator

haha, yes. Who would put a space there?? :D

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

I don't know...people are strange ;)

@tjarvstrand
Copy link
Collaborator

Fixed

@qoocku
Copy link
Author

qoocku commented Nov 27, 2012

Nop. Try this:

abc() ->
    abc(1,2,3,4).

abc(A,B,C,D) ->
    ok.

And try to find abc/4.

@tjarvstrand
Copy link
Collaborator

Hm. No end to the issues it seems and I'm to tired to write unit tests for this right now which I really should, but I think it works now.

@tjarvstrand
Copy link
Collaborator

Rewrote the "parsing"-function entirely. Can you confirm that it works as expected now?

@qoocku
Copy link
Author

qoocku commented Nov 30, 2012

Yep. For me it works well.

@qoocku qoocku closed this as completed Nov 30, 2012
@qoocku qoocku reopened this Nov 30, 2012
@qoocku
Copy link
Author

qoocku commented Nov 30, 2012

Sorry, for reopening: I got to check it on my second box ;)

@qoocku
Copy link
Author

qoocku commented Nov 30, 2012

Success confirmed.

@qoocku qoocku closed this as completed Nov 30, 2012
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