I installed Emacs 29.2
and sbcl 2.4.0
.
Then I installed slime
using the command M-x package-install<Ret>slime<Ret>
. I can see that slime is installed (M-x list-packages):
Now, I'm trying to get slime to work following these instructions:
It is simple as:
- Open emacs
- Open your lisp file with fibonacci function
- Issue M-x slime
- Place you cursor over fibonacci function and press C-c C-c to evaluate/compile it in Slime.
- switch to slime window and call (fibonacci 10)
Screenshot example with hello-world function:
In emacs, I opened a hello world .lisp
file with C-x C-f
. However, when I type M-x slime<Ret>
, I get [No match]
. Same for M-x slime-mode<Ret>
.
Here is my ~/.emacs
file:
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages '(slime paredit)))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)
;;;;;;;;;;;;;;;;;;;;;;;
;; I added the following according to slime install directions:
(setq inferior-lisp-program "sbcl")
sbcl
is in my path:
% which sbcl
/opt/local/bin/sbcl
% echo $PATH
...:/Users/7stud/bin/:/opt/local/bin:....
I tried altering the .emacs file to use the full path to sbcl
:
(setq inferior-lisp-program "/opt/local/bin/sbcl")
but I still get M-x slime [No match]
. I've been quitting emacs and relaunching it after I make changes to the .emacs
file.
Here is my ~/.emacs.d/elpa
directory (which I haven't touched):
% ls
archives macrostep-0.9.2.signed slime-2.29.1
gnupg paredit-26 slime-2.29.1.signed
macrostep-0.9.2 paredit-26.signed
There were a bunch of warnings when I installed slime, but I can't find where those warnings are logged, so I can't post them.
I was able to successfully install and use the package paredit
. When I open a .lisp file, it opens in Lisp major-mode, and if I do M-x paredit-mode
, that adds Paredit as a minor-mode:
After adding Paredit as a minor-mode, parentheses get matched, so it works.
I'm on macOS 12.5.1
, and I installed emacs with:
% sudo port install emacs-app
Edit: =======
I unistalled slime by displaying the package list, M-x list-packages
, then searching for the slime listing, C-s
, then typing d
on the slime listing, then typing x
. I reinstalled slime by finding the slime listing again, then typing i
on the slime line, then x
. Here are the warnings:
⛔ Warning (comp): slime-autodoc.el:51:17: Warning: ‘eldoc-message’ is an obsolete function (as of eldoc-1.1.0); use ‘eldoc-documentation-functions’ instead.
⛔ Warning (comp): slime-autodoc.el:52:15: Warning: ‘eldoc-message’ is an obsolete function (as of eldoc-1.1.0); use ‘eldoc-documentation-functions’ instead.
⛔ Warning (comp): slime-autodoc.el:64:8: Warning: ‘eldoc-message’ is an obsolete function (as of eldoc-1.1.0); use ‘eldoc-documentation-functions’ instead.
⛔ Warning (comp): slime-autodoc.el:106:8: Warning: ‘font-lock-fontify-buffer’ is for interactive use only; use ‘font-lock-ensure’ or ‘font-lock-flush’ instead.
⛔ Warning (comp): slime-autodoc.el:165:14: Warning: ‘eldoc-display-message-p’ is an obsolete function (as of eldoc-1.6.0); Use ‘eldoc-documentation-functions’ instead.
⛔ Warning (comp): slime-autodoc.el:166:10: Warning: ‘eldoc-message’ is an obsolete function (as of eldoc-1.1.0); use ‘eldoc-documentation-functions’ instead.
⛔ Warning (comp): bridge.el:115:2: Warning: defvar `bridge-leftovers' docstring wider than 80 characters
⛔ Warning (comp): slime-cl-indent.el:115:2: Warning: custom-declare-variable `lisp-align-keywords-in-calls' docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime-cl-indent.el:1448:2: Warning: defvar `common-lisp-indent-clause-joining-loop-macro-keyword' docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): hyperspec.el:1320:4: Warning: Alias for ‘common-lisp-hyperspec-glossary-function’ should be declared before its referent
⛔ Warning (comp): slime.el:112:2: Warning: Alias for ‘slime-contribs’ should be declared before its referent
⛔ Warning (comp): slime.el:277:12: Warning: defcustom for ‘slime-completion-at-point-functions’ fails to specify type
⛔ Warning (comp): slime.el:689:4: Warning: Doc string after `declare'
⛔ Warning (comp): slime.el:1160:6: Warning: ‘byte-compile-file’ called with 2 arguments, but accepts only 1
⛔ Warning (comp): slime.el:2408:10: Warning: ‘hide-entry’ is an obsolete function (as of 25.1); use ‘outline-hide-entry’ instead.
⛔ Warning (comp): slime.el:3081:12: Warning: ‘beginning-of-sexp’ is an obsolete function (as of 25.1); use ‘thing-at-point--beginning-of-sexp’ instead.
⛔ Warning (comp): slime.el:3392:16: Warning: ‘beginning-of-sexp’ is an obsolete function (as of 25.1); use ‘thing-at-point--beginning-of-sexp’ instead.
⛔ Warning (comp): slime.el:3681:20: Warning: ‘find-tag-marker-ring’ is an obsolete variable (as of 25.1); use ‘xref-push-marker-stack’ or ‘xref-go-back’ instead.
⛔ Warning (comp): slime.el:4113:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime.el:4960:6: Warning: ‘font-lock-fontify-buffer’ is for interactive use only; use ‘font-lock-ensure’ or ‘font-lock-flush’ instead.
⛔ Warning (comp): slime.el:5536:10: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime.el:5692:10: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime.el:5795:10: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime.el:6329:8: Warning: Obsolete calling convention for 'sit-for'
⛔ Warning (comp): slime.el:6611:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime.el:7187:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime.el:7194:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime.el:7312:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime-parse.el:319:20: Warning: Stray ‘declare’ form: (declare (ignore args))
⛔ Warning (comp): slime-repl.el:130:2: Warning: defvar `slime-repl-history-use-mark' docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime-repl.el:138:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime-repl.el:978:2: Warning: docstring has wrong usage of unescaped single quotes (use \= or different quoting)
⛔ Warning (comp): slime-repl.el:1580:22: Warning: Stray ‘declare’ form: (declare (ignore args))
⛔ Warning (comp): slime-repl.el:1689:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime-presentations.el:601:2: Warning: docstring wider than 80 characters
⛔ Warning (comp): slime-presentations.el:759:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime-presentations.el:760:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime-presentations.el:761:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime-presentations.el:762:4: Warning: ‘easy-menu-add’ is an obsolete function (as of 28.1); this was always a no-op in Emacs and can be safely removed.
⛔ Warning (comp): slime-references.el:102:67: Warning: reference to free variable ‘name’
⛔ Warning (comp): slime-references.el:107:15: Warning: ‘:info’ called as a function
⛔ Warning (comp): slime-references.el:109:15: Warning: ‘t’ called as a function
⛔ Warning (comp): slime-references.el:109:15: Warning: the function ‘t’ is not known to be defined.
⛔ Warning (comp): slime-references.el:107:15: Warning: the function ‘:info’ is not known to be defined.
⛔ Warning (comp): slime-references.el:106:13: Warning: the function ‘case’ is not known to be defined.
⛔ Warning (comp): slime-package-fu.el:226:21: Warning: ‘looking-back’ called with 1 argument, but requires 2 or 3
⛔ Warning (comp): slime-package-fu.el:263:14: Warning: ‘looking-back’ called with 1 argument, but requires 2 or 3
⛔ Warning (comp): slime-trace-dialog.el:162:12: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime-trace-dialog.el:248:16: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime-trace-dialog.el:261:28: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime-trace-dialog.el:352:13: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
⛔ Warning (comp): slime-trace-dialog.el:478:12: Warning: ‘inhibit-point-motion-hooks’ is an obsolete variable (as of 25.1); use ‘cursor-intangible-mode’ or ‘cursor-sensor-mode’ instead
I checked the output in *Messages*
, but it's too voluminous to post here. Here is the end of the output:
...
...
Warning: Optimization failure for make-ert-test: Handler: make-ert-test--cmacro
(error "Keyword argument :file-name not one of (:name :documentation :body :most-recent-result :expected-result-type :tags)")
Warning: Optimization failure for make-ert-test: Handler: make-ert-test--cmacro
(error "Keyword argument :file-name not one of (:name :documentation :body :most-recent-result :expected-result-type :tags)")
Warning: Optimization failure for make-ert-test: Handler: make-ert-test--cmacro
(error "Keyword argument :file-name not one of (:name :documentation :body :most-recent-result :expected-result-type :tags)")
Wrote /Users/7stud/.emacs.d/elpa/slime-2.29.1/contrib/test/slime-repl-tests.elc
Checking /Users/7stud/.emacs.d/elpa/slime-2.29.1/contrib/test...
Done (Total of 57 files compiled, 2 skipped in 4 directories)
ad-handle-definition: ‘slime-note.message’ got redefined
Package ‘slime’ installed.
Operation [ Install 1 ] finished
You were nearly there:
However, when I type M-x slime, I get [No match]
you are missing
(require 'slime)
You must add this in your ~/.emacs
(or "~/.emacs.d/init.el") and you can evaluate in your current session with M-:
or M-x eval-expression<Ret> (require 'slime)<Ret>
.