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

Pressing "g" cannot locate source file. #31

Open
rmuslimov opened this issue May 11, 2017 · 1 comment
Open

Pressing "g" cannot locate source file. #31

rmuslimov opened this issue May 11, 2017 · 1 comment
Labels
Emacs Emacs client related issue

Comments

@rmuslimov
Copy link

Not sure what is broken, here. When I press in "g" during looking into function's trace it fails at the moment of finding proper file:

  • Emacs version 25.1.1
  • latest sayid from master branch

Here https://github.com/bpiel/sayid/blob/master/src/el/sayid.el#L777 I've got exception:
File not found: antonov/api/availability.clj

I tried to trace it in emacs (sayid-find-existing-file file) => ("clojure" "/private/var/folders/ty/q1nfz8qn24x_8p27fx7z14yr0000gp/T" "cider" "mranderson047")`

Looks wrong because project root is not existing here. Please help me trace and fix this exception.

p.s. Sayid probably can go thru existing opened file-buffers, and if filepath will match file requested - write expression there. Or even better solution open cider-scratch and writedown form there.
If you're fine with using cider-scratch I can implement it. thanks!

@bpiel
Copy link
Collaborator

bpiel commented May 11, 2017

Sayid doesn't know how to find a file if none of the files in the project path have been eval'd yet. I'm guessing that's what's going on here. It's a fundamental issue that I'm not sure how to get around.

I'm also guessing that this command mostly worked for you -- in that it probably def'd vars, generated an expression string and put it in the kill ring for you. The last step is to take you to the function's source, which failed.

If the function source can't be found, falling back to cider-scratch sounds like a reasonable default, although sayid should probably give some messaging about why it happened.

A PR to address any of the above would be great. If you submit one, I'll review as quickly as I can. thanks

@bbatsov bbatsov added the Emacs Emacs client related issue label Aug 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Emacs Emacs client related issue
Projects
None yet
Development

No branches or pull requests

3 participants