Tuesday, September 12, 2006

Scheme, Petite, Emacs and the error message; spawning child process invalid argument

This errors been giving me a headache for a while but I've now found the solution!

So I've Gnu Emacs 21.3.1 running on windows and I'm interested in learning scheme. I went into the Control Panel > System > Environmental Variables and edited the PATH variable to include petite. So if I typed petite in a command prompt - up would come the interpretter - great! Or so I thought.

Next I wanted to have it runnable from Emacs, running as a child process so I can compile my code as I type it.

(custom-set-variables '(scheme-program-name "petite"))

Emacs is already preset up for such tinkery so all I need do, is tell it what my scheme program is called. This is where it all went wrong. I could tell emacs to run a shell command, type petite, and it would run it, but tell it to M-x run-scheme, and it failed with the error "spawning child process invalid argument" or a "could not find petite message" depending on if I located gave the full path to petite or just the file name and hoping the windows "path" variable would sort it out.

So various head bangings later and it turns out that emacs doesn't like the quotation marks that I put around the path in the Windows PATH variable. So remember don't to this:


do this

Post a Comment