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.
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
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 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.
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
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
SLIME seems to have copied the code in inf-lisp and exhibits the same
'bug'.
Perhaps a fix is appropriate.
--------------
John Thingstad