[slim-vim] Starting: problems in process-available-input
Tomas Zellerin
zellerin at gmail.com
Wed Aug 16 02:24:02 CDT 2006
Okay, so I recompiled the vim+async+ecl and it works now - thanks. For
record, I made a FC4 rpm package, in case someone would want to start
collecting binary packages (but it is probably too early).
I will have yet to get used to using it, but I still have a few
pedants comments on the setup - feel free to ignore them
- I think most of the content of ecl-slime.vim and ecl-repl.vim should
go to a filetype or ordinary plugin. As you took liberty of
distributing new vim, this should not be much of the problem
- A vim function has() should accept "ecl" as argument and then return
1 when it is present (it returns not for me, thought +ecl is in
features), and it should be used to guard the new features dependend
on ecl presence. *
- I believe <LocalLeader> should be used for most bindings (those
local to buffers) - it is usually same as Leader, though.
- I think, on the other hand, that some mappings (e.g., <Leader>sc)
could be global
- vim files syntax highlighting does not know about ecl keyword :) *
I can easily make patches for those points with * (they are probably
noncontroversal), but it will take me some (calendar) time.
Regards,
Tomas
On 8/15/06, Brad Beveridge <brad.beveridge at gmail.com> wrote:
> 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
> _______________________________________________
> slim-vim mailing list
> slim-vim at lispniks.com
> http://www.lispniks.com/mailman/listinfo/slim-vim
>
More information about the slim-vim
mailing list