Best Scheme implementation for Emacs and The Little Schemer? - emacs

I've tried Geiser and I keep getting this error message:
Unable to start REPL:
Searching for program: permission denied, guile.exe
I'm on Windows 7 by the way. Also, here's my Geiser path in my .emacs:
(load-file "~/.emacs.d/elpa/geiser-20140326.951/geiser.el")
I'm not sure how to fix this since Google isn't returning anything useful and I'm not overly familiar with Emacs or Geiser. I'd really appreciate some help with this or a better/easier Scheme implementation so I can finally start TLS.

Geiser does not provide Scheme. You need to install them for it to use. It requires Racket 5.3.4 or better, or guille 2.0.9 or better, as seen on this page:
http://www.nongnu.org/geiser/geiser_2.html#Installation
This is a link for Racket:
http://racket-lang.org/download/
Sorry can't help you any more, but I don't have windows. I use geiser with guile under linux.

Related

Spawning child processes returns invalid argument

I have a class this semester that requires a lisp dialect so I'm trying to get started with Clojure but I'm running into a lot of problems setting up my environment.
I'm on a Windows machine and am following the tutorial at http://www.braveclojure.com/basic-emacs/ to set up emacs which from my research seems like the best IDE for working with lisp. I had Cygwin installed before starting which supposedly has a lot of support for emacs but I'm not sure if I need to do more than just have it installed.
My problems is when I try to start a REPL in emacs with M-x cider-jack-in I get the response Spawning child process: invalid argument. If I do the M-x load-path command I get a list of every subfolder in my .emacs.d folder but not the .d folder itself but the folder where my cider package is installed is clearly listed.
I installed lein before I decided to try setting up emacs and I could open a REPL just fine with it but emacs seems like a much better way of working than just using the terminal.
Any advice is greatly appreciated but if there is a better/easier way to get started with Clojure on Windows than what I'm currently doing I'd love to hear about it.
Thanks in advance for any replies.
Yes, emacs is great, but if you haven't worked with it before then you will have a very steep learning curve, exacerbated by the fact you are running Windows. I myself use emacs with CIDER a lot, and I also use emacs on Windows quite a bit, but I don't mix it - I use emacs/CIDER only on Linux. It doesn't mean at all that it can't be made to work on Windows, it's just it has a lot of complexity of its own, which you might not have time or inclination to deal with right now. (By the way, I wouldn't recommend using emacs under Cygwin [1] , use a good native build instead. And if you still decide to go with emacs, by all means try Prelude - it comes from the author of CIDER by the way.)
If you want an option that is definitely smoother under the circumstances, download IntelliJ IDEA Community Edition and install Cursive. That will have its own learning curve for sure, but give it a try and see what you prefer. I use both, nothing beats IntelliJ/Cursive in Java interop projects.
Both emacs/CIDER and IntelliJ/Cursive are terrific and will repay for deeper learning.
[1] I am not even sure a combination of emacs on Cygwin and lein/clojure on Win32 can work, but I have no environment to test.
unset the SHELL env variable - taken from: http://tb-nguyen.blogspot.com/2010/05/how-to-fix-emacs-windows-error-spawning.html
It worked for me

Racket and Geiser on Windows, strange path error

When I try (run-racket) or (run-geiser) on my Windows 8.1 machine running GNU Emacs 24.3 and Racket v6.1 I get the following output:
Welcome to Racket v6.1.
default-load-handler: cannot open input file
path: f:/c/Users/James/AppData/Roaming/.emacs.d/el-get/geiser/scheme/racket/geiser/startup.rkt
system error: The system cannot find the path specified.; errno=3
>
Which is decidedly odd, but after browsing the backtrace I still don't have a good idea what's going on.
Indeed, since Racket starts up fine it seems to be some strangeness in the way paths are passed from Geiser to Racket. The only other time I see this kind of path strangeness is when MinGW bash is involved, and that /c/ makes me think that it probably is. In fact, that path would be perfectly valid if not for the leading f:.
I'm at a bit of a loss as to how to approach this problem, as I don't know how Geiser communicates with Racket (I just started trying to use it today), but I would really like to get it to work, as I'm quite invested in Emacs as my editor.
So my question is thus: What possible problem points should I investigate, given the above as clues?
After some digging through the Geiser source I found in geiser/elisp/geiser-load.el the line:
(setq geiser-scheme-dir "/c/Users/James/AppData/Roaming/.emacs.d/el-get/geiser/scheme")
Which was probably generated incorrectly by MinGW make.
I changed it to:
(setq geiser-scheme-dir "c:/Users/James/AppData/Roaming/.emacs.d/el-get/geiser/scheme")
After which everything works perfectly.
The problem was that Emacs' expand-file-name assumed that the /c/... path was a relative path due to the initial forward slash, and guessed that it should prepend the letter of the current drive to make it a proper Windows Emacs path.

Setting up Uber development mode in Emacs for Clojure

I am aware of
A gentle tutorial to Emacs/Swank/Paredit for Clojure
I basically have the same question.
I noted that there is an EDIT saying that the instructions are outdated, and there will be an update (I don't see where the update is posted.)
Thus, my question:
What is the "right way" to setup Emacs w/ Clojure?
Context: I've been coding Clojure w/ VIM for the past few years; but Slime/Swank looks quite impressive.
Thanks!
See http://dev.clojure.org/display/doc/Getting+Started+with+Emacs or more directly, https://github.com/technomancy/clojure-mode/blob/master/README.md, for a pretty good overview of what you need to set up. Basically, install clojure-mode and the leiningen plugin for swank-clojure and you're pretty much good to go. Once those are installed, you just create a new leiningen project, open a clj file from within the project somewhere, and do a M-x clojure-jack-in.

Swank server startup failure

Emacs SLIME can't connect to swank, because apparently swank cannot initialize correctly.
It says some back end function not implemented. However, my swamp backend is SBCL, which is supported. I am using windows xp os.
A similar issue was found posted at the following link, but no solution.Link to similar issue
Am I missing any configuration file for Swank? Or perhaps emacs and SBCL versions I am using have compatibility issues? In that case, where can I get the correct compatibility matrix for windows?
I'm mostly using Linux, but it's very easy to run into conflicts if you have multiple versions of slime/swank code installed.
The best method is to use quicklisp and make sbcl/emacs not use any other code (at least in your first attempt):
sbcl --no-userinit --no-sysinit --load ~/quicklisp/setup.lisp
(asdf:initialize-source-registry '(:source-registry :ignore-inherited-configuration))
(ql:quickload "quicklisp-slime-helper")
(swank:create-server :port 4545 :dont-close t :coding-system "utf-8-unix")
Then start emacs as:
emacs -q -name SLIME -eval '(progn (load (expand-file-name "~/quicklisp/slime-helper.el")) (slime-connect "localhost" 4545))'
http://www.pchristensen.com/blog/articles/installing-sbcl-emacs-and-slime-on-windows-xp
Use this or any other manual, which describes how to install Emacs, sbcl and slime separately. But using the latest releases. Then it will be easier to find the problem than it is now.
This is not exactly an answer to the problem, more of an alternative.
I think some interfaces/ method definitions that Swank expects, need to be implemented by SBCL. I shifted the lisp implementation to CLisp from SBCL, and after some setup tweaking, got it to work. So, I think Swank is fine but SBCL is not.
Just for information, CLisp cannot work with short windows path, the ones that look like "Progra~1", while SBCL expects short paths. CLisp also gave some problem with the temp folder in Windows, for which a variable had to be added to the .emacs file, but after that was setup quickly.
There seem to be lots of differences between the various Lisp implementations' ports to Windows, which would not be a problem had better documentation been present. All this had to be gleaned from different blogs and mailing list.
As soon as a better answer to the original problem comes along, I'll accept that.

How to download and install Emacs for OCaml?

I feel retarded asking this question, but I've been banging my head against the wall for a while now...
This directory is linked to by the website for obtaining emacs: http://ftp.gnu.org/pub/gnu/emacs/. Which file do I want? I downloaded emacs-23.1.tar.gz and unpacked it, but I don't know what to do now. I can't find any files to execute.
(I'm running Vista.)
And then I want to use tuareg mode with OCaml. Help?
I believe you've downloaded the source code, which probably isn't what you want. It might be easier for you to go to download site and download the binaries.
Getting Tuareg to work is as easy as downloading it and following the installation instructions. Some options that I like for Tuareg (but YMMV!):
(setq tuareg-default-indent 4)
(setq tuareg-with-indent 2)
(setq tuareg-|-extra-unindent 2)
Incidentally, set up and whatnot is much easier using Virtualbox + Linux VM; if you're just wanting to play around with Ocaml/Emacs then it might be easier to do that.
You downloaded the linux version - you should instead download http://ftp.gnu.org/pub/gnu/emacs/windows/emacs-23.1-bin-i386.zip
Once you have it, emacs can be started from bin/runemacs
Have a look at EmacsW32 -- it is GNU Emacs with a few tweaks to make it more comfortable for Windows users: http://ourcomments.org/Emacs/EmacsW32.html