Unicode issues
===============
From the latest commit, or really workaround, as it only fixes some cases...
"""
CL:CONCATENATE makes strings of a type different from the one understood
by cl_vim_msg_int(), but by processing the string through FORMAT first,
VIM:MSG works in ECL-8.12.0
"""
What's happening is a Unicode-enabled ECL produces strings of the
"wrong" type, such that the C-functions dealing with strings assume
base_string->self to get at the data, whereas that's not used for
Unicode strings.
Anyway, that small fix, (msg (format nil \"~A\" buffer)) works great for
cl_msg_vim_int(), but not the buffer functions. :/
To further complicate things::
(msg buffer) ; (SIMPLE-ARRAY CHARACTER (...))
vs
(msg (format nil "~A" buffer)) ; (ARRAY BASE-CHAR (...))
From a Unicode-enabled ECL::
> (setf buffer "")
""
> (type-of buffer)
(SIMPLE-ARRAY BASE-CHAR (0))
> (setf buffer (concatenate 'string buffer (string #\A)))
"A"
> (type-of buffer)
(SIMPLE-ARRAY CHARACTER (1))
>
So what we (I ;) need to do is to go through everything dealing with
strings and make sure unicode/non-unicode is used where expected.
SWANK
=====
In other news, I've added Slime (from the previous ecl-slime by the
SlimVim guys) to the repository in <vim-ecl/slime>. Currently trying to
figure out why ARGLIST-FOR-ECHO-AREA doesn't work. If I get it working,
it'll display the argument list for things typed in a Lisp buffer, which
is fun.
Terminal B:
$ sbcl
(require 'swank)
(swank-loader:init :load-contribs t) ; for A-F-E-A
(setf swank:*log-events* t) ; for extra debugging, not strictly required
(swank:create-server)
Terminal A:
$ cd ~/hacking/limp/vim-ecl/slime
$ ECL_SLIME_PATH=$(pwd) vim -c "source ecl-slime.vim"
" go to --debug-sv--
:bn
:5splitnew foo.lisp
,sc
(+<Space>
Well, that's where I am right now.
-- Mikael