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
NixOS: Tell Racket Mode where to look for docs #446
Comments
Although I don't know what's going on let's try to narrow it down by seeing what happens in various scenarios. Let's use a simple Racket program: #lang racket/base
(map add1 (list 1 2 3)) Visit this file in Emacs.
|
It might also be interesting to try that little program in Dr Racket. Move the cursor to "map", right click, then choose the "documentation" item. What happens? |
Thanks a lot for your detailed and kind reply @greghendershott ! Here's a detailed journal of my observations.
No, I don't see either either, but I do see exactly that if I do For the following tests, I restarted Emacs to get a clean session in which I have never turned on
I get this error message:
I get a
"Visit Definitions" and "Documentation in Browser" are clickable links/buttons, as usual.
I get the following error message:
Just in case, I also ran
I don't have "documentation" in the context menu I get when I right-click on I actually tried looking at how DrRacket would show me the docs before, but since I didn't find any related menu item, I thought it just didn't have that functionality (and felt surprised). I will try to find out why Thanks again for your feedback, it's extremely helpful! |
I spent the rest of my evening stepping through macro expansions and reading some Racket. I went down to I also started a thread on Racket Users, just in case someone runs Nix and has some more ideas: https://groups.google.com/forum/#!topic/racket-users/VbGPHEMmyJA I'll get back to playing with this problem tomorrow. |
Sorry, yes, I'd meant to ask you to try The details differ for how The last one where you use |
Potentially also ask at https://github.com/NixOS/nixpkgs ? The Racket config seems to be https://github.com/NixOS/nixpkgs/tree/master/pkgs/development/interpreters/racket |
Yeah, I thought about asking the Nix community as well: they should probably know better. I'll try to do that today or tomorrow and I'll keep you posted. UPDATE: Here's the thread I created on NixOS Discourse: https://discourse.nixos.org/t/racket-does-not-find-documentation-after-update/6712 I'll keep digging on my side as well and I'll keep you posted. |
OK, good news! Someone on the Racket Users Google Group explained where the problem with Racket not finding docs came from and gave a workaround/solution. Looks like it's a regression in Racket distribution. I asked the author of the fix to submit it to Nixpkgs and I hope this regression will be corrected upstream for the next release of Racket. In what concerns Racket mode, documentation started working again with the fix! Except for item (1) from your original checklist, I suppose item (1) was not supposed to work anyway, since Thanks a lot @greghendershott for your help! |
Glad to hear it! Yes, |
Hello and thank you for the awesome work on Racket Mode. The new
racket-xp-mode
is quite a treat and I am looking forward to using it more.I do have an issue, however:
racket-xp-describe
andracket-xp-documentation
seem to have trouble finding the documentation. When I run the first one on, for example,map
, I get a *Racket Describe* window telling me "(Found no documentation or signature." (the opening parenthesis is never closed). When I runracket-xp-documentation
onmap
, I get pointed to the pagefile:///#f?q=map
. This really looks like Racket Mode is looking for documentation in the wrong place. The#f
in the URL I get fromracket-xp-documentation
looks like Racket Mode is invoking a Racket function for locating the documentation, which silently fails returning#f
. But other than these two ideas, I have no clue as to what exactly is happening. I also glanced through the definitions of the two documentation functions inracket-xp.el
. They seem to retrieve the paths to the documentation files from "text properties"; they may be broken in my Racket file, but I am not sure as to what could break them.I am on NixOS, which uses install paths different from other distributions, but I can use packages quite normally (
raco pkg
works flawlessly, requiring modules from user or system-wide installed packages is never a problem, etc.). I run Racket 7.6 and Emacs 26.3.Could you help me debug this issue? I am willing to contribute, but I have never programmed in Elisp seriously enough to be comfortable with
racket-xp.el
directly, nor am I very familiar with Racket package management. I should be fine we a couple pointers though, if you could provide some 🙂The text was updated successfully, but these errors were encountered: