Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

apply: Spawning child process: invalid argument

546 views
Skip to first unread message

ssecorp

unread,
Jul 6, 2008, 6:22:36 AM7/6/08
to
Since i don't get help anywhere else I'll try here. I'm using a lisp
and emacs is written in lisp and the emacs newsgroups never answer :(

I'm using Clojure on emacs and cant get inferior-lisp to work.


("C:\\emacs-22.2\\bin\\emacs.exe")
Loading encoded-kb...done
Loading easymenu...done
Loading regexp-opt...done
For information about GNU Emacs and the GNU system, type C-h C-a.
Loading dired...done
Loading inf-lisp...done
apply: Spawning child process: invalid argument


apply: Spawning child process: invalid argument

Pascal J. Bourguignon

unread,
Jul 6, 2008, 6:42:21 AM7/6/08
to
ssecorp <circul...@gmail.com> writes:

The first thing to investigate is the value of your
inferior-lisp-program variable.

C-h v inferior-lisp-program RET

--
__Pascal Bourguignon__ http://www.informatimago.com/

This is a signature virus. Add me to your signature and help me to live.

ssecorp

unread,
Jul 6, 2008, 9:40:47 AM7/6/08
to
thanks, it is:
"C:/Program Files/Java/jdk1.6.0_06/bin/ -cp C:/clojure_20080612/
clojure.jar clojure.lang.Repl"

i changed it to:
"C:/Program Files/Java/jdk1.6.0_06/bin/java.exe -cp C:/
clojure_20080612/clojure.jar clojure.lang.Repl"

but it still gives the same error.

i can start the clojure-REPL from any directory in the windows command
prompt with:
> java -cp C:/clojure_20080612/clojure.jar clojure.lang.Repl


so it seems the same to me so why doesnt it work?

John Thingstad

unread,
Jul 6, 2008, 10:03:13 AM7/6/08
to

Try Progra~1 instaed of "Program Files"

--------------
John Thingstad

ssecorp

unread,
Jul 6, 2008, 10:16:32 AM7/6/08
to
On Jul 6, 4:03 pm, "John Thingstad" <jpth...@online.no> wrote:

yeeeeessss! ty soooo much both pascal and john!!!!

yes finally.


but why on earth does it work with that? i googled and found out that
it is short for program files but cant emacs recognize Program Files?

John Thingstad

unread,
Jul 6, 2008, 11:09:42 AM7/6/08
to

The emacs reader is seeing eveything after Program as the next command
line argument.
So it can't find file "C:\Program".
On the Bash command line I could write C:/Program\ Files/... but this
doesn't seem to work in Emacs.
Thus I used the DOS 8.3 long name conversion instead. This is really a
anacronism since no-one uses DOS anymore but it still works.
Basically if the name is larger than 8 charactes use the first six
charactes and add ~ and then numbers 1 - 9 to distiguish entries.
I assumed you only had one directory entry starting with Program..

--------------
John Thingstad

Oisín Mac Fhearaí

unread,
Jul 6, 2008, 11:45:17 AM7/6/08
to
On Jul 6, 4:09 pm, "John Thingstad" <jpth...@online.no> wrote:
> The emacs reader is seeing eveything after Program as the next command  
> line argument.
> So it can't find file "C:\Program".
> On the Bash command line I could write C:/Program\ Files/... but this  
> doesn't seem to work in Emacs.

I'm pretty sure I got that to work in Emacs with SLIME on my windows
box at work... but I don't have access to my .emacs atm. Did you try
"C:\\Program\ Files\\" etc?

I did have to struggle with it, though. Setting up Emacs and such was
a bit easier for that reason on my Mac at home. :)

Vassil Nikolov

unread,
Jul 6, 2008, 12:42:06 PM7/6/08
to

On Sun, 6 Jul 2008 08:45:17 -0700 (PDT), Oisín Mac Fhearaí <denpa...@gmail.com> said:

| On Jul 6, 4:09 pm, "John Thingstad" <jpth...@online.no> wrote:

|| ...


|| On the Bash command line I could write C:/Program\ Files/... but this  
|| doesn't seem to work in Emacs.

| ...


| Did you try "C:\\Program\ Files\\" etc?

If "...\ ..." is an Emacs Lisp string literal, it is no different
than "... ...". What really matters is what is tokenizing the
string when it is interpreted as a command, of course; if a
backslash is a single-escape character for that tokenizer (as it is
for a Bourne-type shell), then "...\\ ..." will be what one wants.

---Vassil.


--
Peius melius est. ---Ricardus Gabriel.

Alex Mizrahi

unread,
Jul 6, 2008, 3:18:51 PM7/6/08
to
> but why on earth does it work with that? i googled and found out that
> it is short for program files but cant emacs recognize Program Files?

microsoft handles it by first trying

c:\program.exe files\java\bin\java

that is calling c:\program.exe with parameter "files\..".
and then when it fails it tries next variant where "program files" is a
path component (that's what we need).

but it seems Emacs attempts to crack path itself instead of passing it to
microsoft API, and it doesn't try different variants. and i don't think it
should.. i think there is some way to use path with a space, escaping it
somehow..

but another question is why didn't you try simply:

"java -cp C:/clojure_20080612/clojure.jar clojure.lang.Repl"

it seems to be working fine, as java is in %PATH%l

ssecorp

unread,
Jul 6, 2008, 5:31:00 PM7/6/08
to

:) oh well

John Thingstad

unread,
Jul 6, 2008, 8:05:41 PM7/6/08
to
På Sun, 06 Jul 2008 18:42:06 +0200, skrev Vassil Nikolov
<vnikolo...@pobox.com>:

This is what is run. in inf-lisp.el

;;;###autoload
(defun inferior-lisp (cmd)
"Run an inferior Lisp process, input and output via buffer
`*inferior-lisp*'.
If there is a process already running in `*inferior-lisp*', just switch
to that buffer.
With argument, allows you to edit the command line (default is value
of `inferior-lisp-program'). Runs the hooks from
`inferior-lisp-mode-hook' (after the `comint-mode-hook' is run).
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
(interactive (list (if current-prefix-arg
(read-string "Run lisp: " inferior-lisp-program)
inferior-lisp-program)))
(if (not (comint-check-proc "*inferior-lisp*"))
(let ((cmdlist (split-string cmd)))
(set-buffer (apply (function make-comint)
"inferior-lisp" (car cmdlist) nil (cdr cmdlist)))
(inferior-lisp-mode)))
(setq inferior-lisp-buffer "*inferior-lisp*")
(pop-to-buffer "*inferior-lisp*"))

Note the:
(let ((cmdlist (split-string cmd)))
(set-buffer (apply (function make-comint)
"inferior-lisp" (car cmdlist) nil (cdr cmdlist)))

split-string here works on "[ \f\t\n\r\v]+"

So the problem is not Emacs Windows file handeling.
It is that (defcustom inferior-lisp-program has :type 'string rather than
'file and that string-split is used to seperate the arguments.

--------------
John Thingstad

John Thingstad

unread,
Jul 6, 2008, 8:20:14 PM7/6/08
to
På Mon, 07 Jul 2008 02:05:41 +0200, skrev John Thingstad
<jpt...@online.no>:

SLIME seems to have copied the code in inf-lisp and exhibits the same
'bug'.
Perhaps a fix is appropriate.

--------------
John Thingstad

0 new messages