Thursday, May 28, 2026

Using Emacs as editor for SBCL on Windows 10

Using Emacs as editor for SBCL on Windows 10

Emacs is installed in C:\emacs, using version 30.2. I run it using C:\emacs\bin\runemacs.exe.

SBCL version 2.6.4 (sbcl-2.6.4-x86-64-windows-binary.msi) is installed in C:\Program Files\Steel Bank Common Lisp
  1. Install Sly package in Emacs
  2. M-x package-refresh-contents
    M-x package-install RET sly RET
    
  3. Create or edit ~/.emacs.d/init.el
  4. Edit or replace contents like below
  5. Restart Emacs
  6. Load Sly
  7. M-x sly RET
    
Note: Verify that you are not using ~/.emacs, otherwise it will not load configration from ~/.emacs.d/init.el

Below shows SLY with SBCL loaded.

I am having issues running code below on Windows 10, it seems the input is buffered. Pressing RET does not properly go to the next prompt.
(defun prompt-for-cd ()
  (make-cd
   (prompt-read "Title")
   (prompt-read "Artist")
   (or (parse-integer (prompt-read "Rating") :junk-allowed t) 0)
   (y-or-n-p "Ripped [y/n]: ")))
There is a workaround for the above bug, see below:
https://github.com/joaotavora/sly/commit/5a05c033197693462e67004549c24e0676eed53b

No comments:

Installing CFFI on SBCL on Windows 11

Installing CFFI on SBCL on Windows 11 Version info: - OS: Windows 11 23H2 (Microsoft Windows [Version 10.0.22631.7079]) - Emacs: 30.2 - ...