Question

It's a very easy scheme function

(define member?
  (lambda (a lat)
    (cond
      ((null? lat) #f)
      (else (or (eq? (car lat) a)
                (member? a (cdr lat))
                ))
      )
    )
  )

However, when I pressed ,d or ,F in vim to run this function, there is an error

/home/oo/tmp/t.scm:64 read-error: no dispatch function defined for #\F

Line: 4, Column: 21, File-Position: 64

Stream: #<SB-SYS:FD-STREAM for "file /home/oo/tmp/t.scm" {AC84DA9}>

enter image description here

Was it helpful?

Solution

Chris already pointed out that you tried to use Scheme code with a Common Lisp swank server. You need to run a Scheme swank server (e.g. swank-mit-scheme.scm, also included in Slimv). Normally Slimv should autodetect MIT scheme on Linux without any tweaking in the .vimrc. For the autodetection to work properly you need MIT Scheme installed and the scheme command be available.

I suggest that you remove any Slimv related settings from your .vimrc. Then load the .scm in Vim and type this command:

:echo SlimvSwankCommand()

If Scheme was autodetected then this should print the command that runs the Scheme swank server (search for swank-mit-scheme.scm in the output). If the autodetection was unsuccessful then either you don't have the scheme command or Slimv did not find swank-mit-scheme.scm. In this case you need to tell Slimv the command to run the Scheme swank server. You can do in by adding a similar command to your .vimrc:

let g:slimv_swank_cmd = '! xterm -e scheme --load /your-path-to/slime/contrib/swank-mit-scheme.scm &'

But do this only if autodetection fails. If you need some more assistance, please feel free to contact me, I'm the author of Slimv.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top