[slime-devel] communication between elisp and common lisp

Jong W Kim jongkim at psu.edu
Wed Feb 7 19:54:56 UTC 2007


Hello,

I am trying to have elisp and common lisp communicate with each other  
inside Emacs. I am using OpenMCL with SLIME on a PowerBook G4.

I have two files. One is "jong.el" and the other is "jong.lisp". Here  
is the code.

in the file of "jong.el"

(defun man-hello (astring)
    (if (equal "hello-el" astring)
       (slime-repl-send-input "hello-cl"))
        (progn (goto-char (point-max))
               (insert ":hello-cl")
               (slime-repl-return)))


in the file of "jong.lisp"

(defvar aa nil "a test variable.")

(defun ehello-world ()
   (format t "~%Connecting in ehello-world...")
   (format t "~%MAN:hello-el")
   (setq aa (read-line ))
   (if (string= aa "hello-cl")
       (format t  "...conected.")
       (format t "connection not established with emacs.")))


I am loading the "jong.lisp" file into OpenMCL. Then, by pressing M-x  
load-file, I am loading the "jong.el".

The result is:

Connecting in ehello-world...
MAN:hello-el

and it hangs until I press a key. If I press a key, I get the message  
below:

connection not established with emacs.

I used "slime-repl-send-input". Could  you please give some advice on  
this?



Thanks,

Jong Kim





More information about the slime-devel mailing list