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
ssecorp <············@gmail.com> writes:
> 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
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.
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?
P� Sun, 06 Jul 2008 15:40:47 +0200, skrev ssecorp <············@gmail.com>:
> 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?
Try Progra~1 instaed of "Program Files"
--------------
John Thingstad
On Jul 6, 4:03 pm, "John Thingstad" <·······@online.no> wrote:
> På Sun, 06 Jul 2008 15:40:47 +0200, skrev ssecorp <············@gmail.com>:
>
>
>
> > 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?
>
> Try Progra~1 instaed of "Program Files"
>
> --------------
> John Thingstad
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?
P� Sun, 06 Jul 2008 16:16:32 +0200, skrev ssecorp <············@gmail.com>:
> On Jul 6, 4:03�pm, "John Thingstad" <·······@online.no> wrote:
>> P� Sun, 06 Jul 2008 15:40:47 +0200, skrev ssecorp
>> <············@gmail.com>:
>>
>>
>>
>> > 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?
>>
>> Try Progra~1 instaed of "Program Files"
>>
>> --------------
>> John Thingstad
>
>
>
> 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?
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
On Jul 6, 4:09 pm, "John Thingstad" <·······@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. :)
On Sun, 6 Jul 2008 08:45:17 -0700 (PDT), Ois�n Mac Fheara� <···········@gmail.com> said:
| On Jul 6, 4:09�pm, "John Thingstad" <·······@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.
P� Sun, 06 Jul 2008 18:42:06 +0200, skrev Vassil Nikolov
<···············@pobox.com>:
> On Sun, 6 Jul 2008 08:45:17 -0700 (PDT), Ois�n Mac Fheara�
> <···········@gmail.com> said:
>
> | On Jul 6, 4:09�pm, "John Thingstad" <·······@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.
>
>
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
P� Mon, 07 Jul 2008 02:05:41 +0200, skrev John Thingstad
<·······@online.no>:
> P� Sun, 06 Jul 2008 18:42:06 +0200, skrev Vassil Nikolov
> <···············@pobox.com>:
>
>> On Sun, 6 Jul 2008 08:45:17 -0700 (PDT), Ois�n Mac Fheara�
>> <···········@gmail.com> said:
>>
>> | On Jul 6, 4:09�pm, "John Thingstad" <·······@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.
>>
>>
>
> 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.
SLIME seems to have copied the code in inf-lisp and exhibits the same
'bug'.
Perhaps a fix is appropriate.
--------------
John Thingstad
> 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
On Jul 6, 9:18 pm, "Alex Mizrahi" <············@gmail.com> wrote:
> > 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
:) oh well