This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: swank-kawa.scm


On Sun, Apr 21, 2013 at 4:11 PM, Chuah Teong Leong <teongleong@gmail.com> wrote:
> I did M-- M-x slime kawa properly this time round, finally figured
> that out. I still get the same error message.
>
> java.util.ServiceConfigurationError:com.sun.tools.attach.spi.AttachProvider:
> Provider
> sun.tools.attach.WindowsAttachProvider could not be instantiated:
> java.lang.UnsatisfiedLinkError: no attach in java.library.path
>
> swank$Mnkawa.attach(swank-kawa.scm:1777)
>
> not sure what is happening here with attach function.
>
>
> On Sun, Apr 21, 2013 at 3:04 PM, Chuah Teong Leong <teongleong@gmail.com> wrote:
>> Hi Helmut Eller,
>>
>> I've been looking into kawa support within emacs. So far I have slime,
>> scheme-complete, paredit set up. I came across this code you wrote.
>>
>> I have 2 problems that I'm hoping you could help me with.
>>
>> 1) Compilation
>> I'm working on windows and I'm not exactly sure if I got the
>> compilation process correct. I ran kawa with -cp to tools.jar and
>> kawa.jar and did (compile "swank-kawa.scm" "swank-kawa") from the
>> repl. There wasn't any error message and it produced a swank-kawa.zip
>> within slime\contrib. I'm wondering if it should have been renamed to
>> a jar and included it in the classpath. I haven't done anything yet
>> and assume that is how it should be.
>>
>> 2) Usage
>> at the end of the instruction you said
>> "Start everything with  M-- M-x slime kawa"
>>
>> I couldn't quite figure how to do that.
>> I did M-x slime and got this
>>
>> (begin (require "G:/emacs-24.2/lisp/slime/contrib/swank-kawa.scm")
>> (start-swank "c:/Users/****/AppData/Local/Temp/slime.13604"))
>> Listening for transport dt_socket at address: 49420
>> #|kawa:1|# Thread[swank,5,main]
>> #|kawa:2|# connection: Socket[addr=/127.0.0.1,port=49424,localport=49423]
>> listener: Thread[swank-listener,5,main] 28560412 chan@df11d5 #<environment r0>
>> attaching: $PPID 20
>> attaching2: com.sun.jdi.ProcessAttach (defaults: pid=, timeout=)
>> {pid=pid=$PPID, timeout=timeout=20}
>> java.util.ServiceConfigurationError:
>> com.sun.tools.attach.spi.AttachProvider: Provider
>> sun.tools.attach.WindowsAttachProvider could not be instantiated:
>> java.lang.UnsatisfiedLinkError: no attach in java.library.path
>> closing socket: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=49423]
>> exception in thread Thread[swank,5,main]: java.lang.Error: mcase failed tmp
>> (chan@cc7ed2
>>  (error "java.io.IOException: no providers installed" "IOException"
>>   ("com.sun.tools.jdi.ProcessAttachingConnector.attach(ProcessAttachingConnector.java:104)"
>>    "swank$Mnkawa.attach(swank-kawa.scm:1777)"
>>    "swank$Mnkawa.vmAttach(swank-kawa.scm:1758)"
>>
>>
>>
>> How should I run my own kawa code so that slime-kawa could hook onto
>> it? So far I do it from emacs' eshell and I have a batch file
>> somewhere that runs java kawa.repl %* that is within the PATH

I figured what I did wrongly.

;; within my .emacs file
(defun kawa-slime-init (file _)
  (setq slime-protocol-version 'ignore)
  (let ((swank "G:/emacs-24.2/lisp/slime/contrib/swank-kawa.zip")) ;
<-- insert the right path (I used the scm instead of the zip before)
    (format "%S\n"
            `(begin (require ,(expand-file-name swank)) (start-swank ,file)))))

Now I get a constant polling from slime in *messages*
Polling "c:/Users/****/AppData/Local/Temp/slime.11304" .. 826 (Abort
with `M-x slime-abort-connection'.)

I also get a working kawa repl with some weird error message in the beginning
(begin (require
"G:/HOME/.emacs.d/extra-lisp/slime/contrib/swank-kawa.zip")
(start-swank "c:/Users/****/AppData/Local/Temp/slime.11304"))
Listening for transport dt_socket at address: 54106
#|kawa:1|# G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:4:
invalid character #\^C
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:5: invalid
character #\^D
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:6: invalid
character #\^T
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:7: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:11: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:16: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:17: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:18: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:19: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:20: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:21: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:22: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:23: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:24: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:25: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:26: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:27: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:28: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:29: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:1:30: invalid
character #\^@
G:\HOME\.emacs.d\extra-lisp\slime\contrib\swank-kawa.zip:5:24: An
unexpected close paren was read.

Doesn't look like it is working the way it is supposed to but it is a
step forward.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]