[slim-vim] bugs with -u NONE -U NONE

Dmitry Petukhov dmgenp at gmail.com
Wed Aug 30 04:11:29 CDT 2006


2006/8/29, Brad Beveridge <brad.beveridge at gmail.com>:

> This is really perplexing then.  I run 0.9.15, and if it works with
> Slime, it ought to be fine.  The only way I can think of to debug this
> is
> 1) Open Emacs and connect to Slime, open the "slime-messages" buffer
> 2) Reproduce steps on regular Slime, copy the text is slime-messages
> 3) Reproduce on Slim-vim and copy the data from --sv-debug--

i've compared slime and slim-vim conversation with swank, turns out what slime d

o not send package = nil with invoke-nth-restart-for-emacs, and also
sends the thread number

slime:
(:emacs-rex
 (swank:invoke-nth-restart-for-emacs 1 0)
 nil 2 17

slim-vim:
(:EMACS-REX (SWANK:INVOKE-NTH-RESTART-FOR-EMACS 1 0) "COMMON-LISP-USER" T 4)

I tried to fix this, and with the patch below, slim-vim<>swank
conversation is similar to slime<>swank. And i even observed correct
behaviour once - but for most times, vim crashes with


E315: ml_get: invalid lnum: 16
E315: ml_get: invalid lnum: 16Segmentation violation.

number varies.


the patch:

--- old-ecl-slime/slime.lisp    2006-08-30 15:07:14.000000000 +0600
+++ new-ecl-slime/slime.lisp    2006-08-30 15:07:14.000000000 +0600
@@ -246,7 +246,7 @@
 (defun sldb-invoke-restart (number)
   (when (slime::connected-p)
     (rex ()
-      ((list 'swank::invoke-nth-restart-for-emacs
interface::*sldb-level* number))
+      ((list 'swank::invoke-nth-restart-for-emacs
interface::*sldb-level* number) nil interface::*sldb-thread*)
       ((:ok value) (format t "Restart returned: ~s" value))
       ((:abort)))))

@@ -289,7 +289,7 @@
        ((:emacs-rex form package thread continuation)
         (let ((id (incf *continuation-counter*)))
           (push (cons id continuation) *rex-continuations*)
-          (swank-protocol:encode-message `(:emacs-rex ,form ,package,
thread, id) *stream*)))
+          (swank-protocol:encode-message `(:emacs-rex ,form ,package
,thread ,id) *stream*)))

        ((:return value id)
         (let ((rec (assoc id *rex-continuations*)))


More information about the slim-vim mailing list