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

cider-eval-defun-at-point doesn't set file and line metadata #631

Closed
hugoduncan opened this issue Jun 17, 2014 · 3 comments
Closed

cider-eval-defun-at-point doesn't set file and line metadata #631

hugoduncan opened this issue Jun 17, 2014 · 3 comments

Comments

@hugoduncan
Copy link
Member

When compiling a function in .clj buffer with cider-eval-defun-at-point, the file and line do not get set in the resulting code. This makes it impossible to jump to the location of the function.

@bbatsov
Copy link
Member

bbatsov commented Jun 17, 2014

All interactive evaluations suffer from this. Not sure what we can do about this without an alternative eval middleware.

@bbatsov
Copy link
Member

bbatsov commented Jun 24, 2014

I've opened an issue regarding this upstream http://dev.clojure.org/jira/browse/NREPL-59 //cc @cemerick

Let's see how the discussion will go. I'm not thrilled by the prospect of overriding the default eval, but it might come to this in the end.

bbatsov pushed a commit that referenced this issue Aug 15, 2014
Interactively evaluated var definitions lack metadata, so we can't
easily navigate to them. To workaround this we look for definitions
in open Clojure buffers.
@bbatsov
Copy link
Member

bbatsov commented Aug 16, 2014

I've implemented a simple workaround for the time being - if we cannot find a definition via var-info we simply search the open buffers for one having the namespace of the var in question and find its definition in it using a regexp. While it's not bulletproof this works pretty well in practice.

@bbatsov bbatsov closed this as completed in d07b7a0 Sep 4, 2014
bbatsov pushed a commit that referenced this issue Sep 4, 2014
A small present for the awesome @cemerick :-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants