[slim-vim] Starting: problems in process-available-input

Brad Beveridge brad.beveridge at gmail.com
Tue Aug 15 09:15:54 CDT 2006


On 14/08/06, Tomas Zellerin <zellerin at gmail.com> wrote:
> On 8/14/06, Brad Beveridge <brad.beveridge at gmail.com> wrote:
> > On 14/08/06, Tomas Zellerin <zellerin at gmail.com> wrote:
> > > 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.
> > >
> > 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)))
>
> Yes, the one in ecl-slime yes. (there is also another in
> slime/swank.lisp, with different signature, but that should not come
> into play on vim side I guess)
>
> >
> > 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))
> >
> No, I am missing the make-network-callback part. Does that mean that I
> have to recompile the vim to get up-to-date version, or only runtime
> files were changed?
>
> Tomas

I'm not 100% sure if only the runtimes have been changed.  To be safe,
I would get the latest Vim7 again and recompile.

Cheers
Brad


More information about the slim-vim mailing list