I have emacs 24.5 for windows installed, and when I try to run a scheme program in the buffer with C-x C-e it says run-scheme
and when I hit enter it then says searching for program: no such file or directory, scheme
. Looking around I have only found tutorials for unix systems, and downloading Linux is not an option for me at this computer. The other resources I have found were vague or unhelpful. I would really like to use emacs but so far I have not been able to use it at all
Asked
Active
Viewed 1,948 times
2

Drew
- 29,895
- 7
- 74
- 104

Anandamide
- 243
- 1
- 15
-
1I know absolutely nothing about scheme, but it is probably safe to say that Emacs can't find the binary executable of `scheme` on your hard drive. For example, it might be located at `c:\hello_world\scheme.exe`. In general, Emacs uses a variable to set the location of an executable and it often tries something like `executable-find` -- if the `scheme.exe` is not in the PATH used by Emacs, then add its folder location to the PATH or modify the variable that points to executable to use the absolute path to `scheme.exe`. If you haven't installed `scheme.exe` yet, then install it. – lawlist Nov 04 '15 at 22:00
-
It should be using xscheme.el which is inside the emacs directory, it comes with the install – Anandamide Nov 04 '15 at 22:02
-
1For example, you may wish to configure the variable `scheme-program-name` to use the absolute path -- e.g., `(setq scheme-program-name "c:\hello_world\scheme.exe")` The variable is defined in the library `scheme.el` which is required by the library cited by Jordan in the comment above. The default value is `scheme` which will only work if the folder where `scheme.exe` is located is on the PATH used by Emacs -- using the absolute path will likely resolve the issue. Be sure to evaluate the expression or restart Emacs after adding the above code-snippet to the `.emacs` file. – lawlist Nov 04 '15 at 22:06
-
Where is the .emacs file located at in reference to the parent emacs directory? Is the file just ".emacs" or "textleftout.emacs"? I imagine if I was able to set this up in a Unix environment it would be considerably simpler, but using unix tools on windows is definitely difficult. – Anandamide Nov 04 '15 at 22:14
-
1You will need to create the `.emacs` file -- a plain flat text file and place it in your home directory. Here are a few links that describe where it is located on Windows: https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Location-of-init-file.html and http://stackoverflow.com/questions/189490/where-can-i-find-my-emacs-file-for-emacs-running-on-windows For example, I use Windows XP and I chose to create an `init.el` file inside my `.emacs.d` directory, which is an alternative to using a `.emacs` file. For me: `c:/Documents and Settings/lawlist/Application Data/.emacs.d/init.el` – lawlist Nov 04 '15 at 22:15
-
@Jordan, `xscheme.el` is not an implementation of Scheme; it [interacts with a separately-installed MIT Scheme](http://www.emacswiki.org/emacs/ExScheme). So you'll have to make sure to have MIT Scheme installed as well, and ensure that Emacs / `xscheme.el` can find it as suggested by others. (Note that other Schemes won't work with `xscheme.el`, as mentioned in the previous link.) – ChrisGPT was on strike Nov 05 '15 at 14:25
1 Answers
2
- M-x customize-variable
- Enter 'scheme-program-name'. Press Enter.
- Replace 'scheme' with the path to your Scheme executable.
- Click the 'State' button and select 'Save for Future Sessions'.
Or, you could add the path to your Scheme to Windows' PATH variable and only use its name in 'scheme-program-name'.
Or, you can edit your startup file by hand, but that's not really necessary.

molbdnilo
- 64,751
- 3
- 43
- 82
-
I tried that, and it didn't work, I put in C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe and it still says "searching for program: no such file or directory, scheme :/ – Anandamide Nov 06 '15 at 05:31
-