Setting Racket Geiser Emacs Path
Asked Answered
B

3

12

I'm trying to get Geiser's REPL to work in Emacs, but it doesn't seem to be able to find Racket.

racket is on my path, but anytime I type

run-geiser

followed by

racket

it complains:

Unable to start REPL: Searching for program: no such file or directory, racket

I read in the Geiser docs that I may have to manually tell Geiser where to find racket, but I can't tell where to configure this property of Geiser.

Thanks for your help.

Beaudette answered 11/2, 2012 at 2:23 Comment(1)
Just for reference: Scott probably saw the configuration option in nongnu.org/geiser/geiser_3.html#impl_002dbinaryNodarse
B
20

Ok, so I added:

(setq geiser-racket-binary "/home/user/racket/bin/racket")

to my .emacs file after loading geiser.el.

I was expecting a configuration file somewhere to set this.

Thanks.

Beaudette answered 11/2, 2012 at 3:25 Comment(2)
.emacs is the main file to configure your Emacs... BTW, another option is to either add that /home/user/racket/bin to your PATH, or add symlinks from a directory that is in your PATH (like /home/user/bin).Eb
Ya, the problem is that the path isn't being picked up. I have racket in my path, and can type it anywhere, but geiser can't seem to find it unless I put in the explicit binary path above.Beaudette
H
1

I know this is an old question, but for future people having a hard time getting it to find the Racket executable despite it being in your path, you can simply use the executable-find function.

This searches your path and returns the absolute path to the executable, which is what the geiser-racket-binary function wants. So this is an alternative to explicitly setting the absolute path:

(setq geiser-racket-binary (executable-find "Racket"))
Hittel answered 23/11, 2016 at 14:41 Comment(0)
M
0

In Windows, adding the location of the Racket executable to the "path" environment variable which is part of Windows will allow Geiser/Emacs to find the Racket Executable.

Mckenna answered 4/11, 2013 at 18:34 Comment(1)
Note that the OP stated that racket was in its path env variable.Walk

© 2022 - 2024 — McMap. All rights reserved.