0
votes

If I run this code

(format t "~a" "hello world")

in sbcl's default REPL, the output is "hello world" as expected. However, when I try to run the same code in slime mode in emacs, it throws the following error:

eval: Wrong type argument: stringp, t

What is that i am doing wrong here ?

1
Are you sure you are running it in SLIME's repl? The error is coming from Emacs Lisp (the language in which Emacs is written), not Common Lisp (SBCL), which you say you are using. Emacs Lisp also has format function, but it needs the first argument to be a string.user797257

1 Answers

1
votes

This is an Emacs error message, not an SBCL's one.

You are giving the form to Emacs and in Emacs Lisp the function format does not take a stream designator as the first argument:

format is a built-in function in `editfns.c'.

(format STRING &rest OBJECTS)

Format a string out of a format-string and arguments. The first argument is a format control string. The other arguments are substituted into it to make the result, a string.