[slim-vim] Starting: problems in process-available-input
Brad Beveridge
brad.beveridge at gmail.com
Mon Aug 14 10:22:08 CDT 2006
On 14/08/06, Tomas Zellerin <zellerin at gmail.com> wrote:
> Hi,
>
> I tried again to start with slim-vim, and stopped on a crash.
>
> I do as suggested in README, getting to <Leader>-sc (backslash being
> the leader), and then the vim shouts "Wrong number of arguments passed
> to function slime:process-available-input, and then bunch of "0 is an
> illegal frs index.", and then vim crashes.
>
> Any ideas what is wrong? I have up-to-date ecl-{slime,repl} from
> tarballs and slime-2.0.
>
> Regards,
>
> Tomas
Yeash, that sounds bad! Can you please confirm that
process-available-input looks like this?
(defun process-available-input (stream)
(loop while (listen stream) do
(vector-push-extend (read-char stream) *input*))
(loop for message = (swank-protocol:decode-message *input*)
while message
do (dispatch-event message)))
And if you look in your vim directory ./runtime/if_ecl.lisp, do you
have this code?
(let ((callbacks (make-hash-table)))
;; the hashtable is kept to ensure callback closures
;; are not garbage collected.
(defun make-network-callback (stream callback)
(let ((first t))
(lambda ()
(when (and first (listen stream))
(unwind-protect
(progn
(setf first nil)
(ignore-errors
(cl:funcall callback stream)))
(setf first t))))))
(defun add-input-listener (stream callback)
"Registers a callback to be invoked when data arrives to a stream"
(check-type stream stream)
(check-type callback function)
(let ((network-callback (make-network-callback stream callback)))
(setf (gethash stream callbacks) network-callback)
(add-input-listener-int stream network-callback))
t)
(defun remove-input-listener (stream)
"Unregisters the input-listener for a stream"
(check-type stream stream)
(remove-input-listener-int stream)
(remhash stream callbacks)
t))
This is the latest code, if your code still looks like this, then we
will have to dig a bit deeper :)
Larry - I think we need to figure out some sort of internal versioning
constant for both Slim-Vim and Vim+ECL.
Cheers
Brad
More information about the slim-vim
mailing list