Hot answers tagged

7 votes

How to properly use emacs and slime to program in Common Lisp

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 ...
Maxim Kim's user avatar
  • 1,761
7 votes
Accepted

Why does Emacs indent my Lisp LOOP construct weirdly?

You can use indentation provided by a SLIME contribution: (require 'slime-cl-indent) You may want to add that to the list slime-contribs- see Loading Contribs in the SLIME manual. One can add it to ...
Rainer Joswig's user avatar
5 votes

Conditional key binding: Evil vs Slime conflict for "M-."

I also considered binding M-. to a wrapper function [...] but I want the "else" clause to do whatever M-. would have done if evil wasn't enabled. You could bind it to a conditional binding, the ...
npostavs's user avatar
  • 9,143
3 votes

Why does Emacs indent my Lisp LOOP construct weirdly?

I found, it is more appropriate to add into contribs 'slime-indentation. it will load slime-cl-indent. And after that, you can use this code to choose required indentation style: (setq lisp-indent-...
Alexander Artemenko's user avatar
3 votes

Conditional key binding: Evil vs Slime conflict for "M-."

For what it may be worth, the solution suggested above did not work in its original form but it works with evil-normal-state-map: (define-key evil-normal-state-map (kbd "M-.") `(menu-item "" evil-...
Rafal Lukawiecki's user avatar
3 votes
Accepted

Make SLIME aware of file extensions other than ".lisp"

Try adding: (add-to-list 'auto-mode-alist '("\\.cl\\'" . slime-mode)) (add-to-list 'auto-mode-alist '("\\.asd\\'" . slime-mode)) to your init/config file. Then files with those extensions will use ...
elethan's user avatar
  • 4,805
3 votes
Accepted

Help Buffer on Hover Possible?

For years I've used the rgr/context-help solution from the EmacsWiki for this, with some slight tweaks. A few aspects still bothered me, though, so this question inspired me to write a new variant of ...
phils's user avatar
  • 50.4k
3 votes
Accepted

Looking for a better theme fix in Slime

You should be able to permanently change the face via the customization facility. Try: M-x customize-face slime-repl-inputed-output-face Then you can change the foreground color directly, and if you ...
Tyler's user avatar
  • 22.1k
2 votes
Accepted

Is it possible to open file then load slime automatically?

Using (slime) by itself already splits the buffer, so a separate function to split the buffer is unneeded. By itself it's a one-liner, but to avoid annoying questions and unintended restarts, we need ...
Soupy's user avatar
  • 178
2 votes
Accepted

How to change Org-mode Babel lisp source code block from SLIME to SLY?

The easiest way is to parametrize the call slime-eval, using funcall and a defvar/defcustom and take advantage use of sly's retro contrib, which allows the user to refer to the slynk pacage by the ...
PuercoPop's user avatar
  • 396
2 votes
Accepted

Why is slime working in emacs but not in the minimal set-up?

Slime isn't part of the base Emacs install. You need to add it to your config. Usually this is done via package-install-packages, but you may have downloaded the code yourself. Regardless of how you ...
Tyler's user avatar
  • 22.1k
2 votes
Accepted

Is there a way to automatically indent a parenthesis in Slime REPL after pressing `C-m o`?

C-j runs slime-repl-newline-and-indent which I think will work. Whenever I'm faced with an unfamiliar mode, I do C-h m which shows me mode information, including the keymaps: I can then zero in on the ...
NickD's user avatar
  • 29.2k
2 votes
Accepted

How do I move the cursor to be just after the `>` character on the beggining of REPL evaluation?

The slime REPL buffer is is REPL mode. You can get information about the mode with C-h m. That is useful in that it shows you the keymap for the mode, and among other things, you will see that C-c C-p ...
NickD's user avatar
  • 29.2k
2 votes

How do I move the cursor to be just after the `>` character on the beggining of REPL evaluation?

backward-sexp, bound to C-M-b by default`, would do it. Of course, if you’re nested inside several s–expressions then you would need to press it multiple times. So perhaps you want beginning-of-defun, ...
db48x's user avatar
  • 17.6k
2 votes
Accepted

In Magit, the command `magit-status` opens the buffer with the status buffer. Is there some similar command to do the same but with the Slime's REPL?

You want slime-switch-to-output-buffer, bound to C-c C-z by default. The SLIME User Manual has the documentation for this and many other interesting commands. You can read it inside of Emacs (use C-h ...
db48x's user avatar
  • 17.6k
2 votes
Accepted

Why having a system loaded makes any difference for indentation?

SLIME examines the argument list of macros to determine how to indent them correctly. Note that the indentation for the code supplied to the sera:and-let* macro went from being aligned with the first ...
db48x's user avatar
  • 17.6k
2 votes
Accepted

How can I configure Slime to use case sensitive symbols?

Common Lisps Reader converts all symbols to uppercase, when reading them. To use lowercase symbols in Common Lisp you have to escape them with | | or \. So this is not an SLIME/SLY issue at all. CL-...
jue's user avatar
  • 4,556
1 vote
Accepted

Why does Slime have the two commands `C-down` and `M-n`?

You were close to figure it out, but you needed to dig a little bit deeper. These commands are completely different beasts. I'll explain with an example, using slime-repl-previous-input (bound to M-p) ...
aadcg's user avatar
  • 1,248
1 vote
Accepted

Why this "keybinding conflicts" message keeps appearing? How can I fix it?

Both SLIME and SLY are user interfaces for interacting with a running Lisp process. SLY is much newer than SLIME, and so it copies some conventions and key bindings from SLIME. You can’t usefully use ...
db48x's user avatar
  • 17.6k
1 vote
Accepted

`C-c C-c` compilation stopped working in SLIME but works if manually typed, how to fix it?

I did not mention it in my post, but after installing Paredit I also installed Sly, a fork from the Slime project. This was the root of the problem. I learned how to uninstall packages with this post. ...
Pedro Delfino's user avatar
1 vote

slime-call-defun equivalent in sly?

Since no one answered, I've done a naive implementation. This is a community wiki answer in hope, the implementation evolves over time. (defun my-sly-copy-call-to-repl () "Copy name/symbol of ...
1 vote

Running slime in spacemacs

I managed to answer this one myself. Since some spacemacs configuration seems to have been reseting or preventing a load containing slime, I decided to just git clone slime into a different directory ...
Garrett Badeau's user avatar
1 vote
Accepted

Electric pair mode's delete adjacent pairs functionality not working in Slime REPL

slime-repl-mode overrides in slime-repl-mode-map the key-binding for electric-pair-delete-pair. The override is not very surprising. It is just backward-delete-char-untabify. The binding in global-map ...
Tobias's user avatar
  • 33.1k
1 vote
Accepted

Error running timer using ac-slime

I found the cause for this issue: Somehow my ac-comphist.dat was corrupted and therefore led to this error for some candidates. I cleared the file and everything works fine again.
Martin Buchmann's user avatar
1 vote

SLIME 2.20 obsolete

If you have installed several versions of a package, Emacs will mark all but the newest as obsolete and offer deleting the obsolete ones as they're no longer needed (which you can do manually with ~).
wasamasa's user avatar
  • 22.1k
1 vote
Accepted

Load elisp file only when file with specific extension is opened

Thanks to @Dan for suggesting to use autoload. Instead of detecting the file type, I binded the load to the slime function, like this: (autoload 'slime "path/to/slime-helper.el "Launch SLIME" t nil)...
TrakJohnson's user avatar
1 vote
Accepted

Does slime-repl-ansi-color work at all these days?

It still works. You need to have the file in the contrib directory under .emacs.d/elpa/slime-20170319.1601, then do something like (push 'slime-repl-ansi-color slime-contribs) (slime-setup) to ...
Frédéric Dumont's user avatar
1 vote
Accepted

Slime inspector customization (Common Lisp development)

Not sure if that's applicable here, but there is a chance to do that on the CLOS level, if the CLOS implementation supports the meta-object protocol (MOP). Using Clozure CL - a Common Lisp ...
Rainer Joswig's user avatar
1 vote

How to force the window splitting direction when starting slime?

Just for reference as lawlist's answer did not work for me. I instead had to use: (setq split-height-threshold nil) (setq split-width-threshold 0)
Dionysis's user avatar
  • 328
1 vote
Accepted

How to force the window splitting direction when starting slime?

According to the doc-string of the variable split-window-preferred-function, the value should be a "[f]unction called by 'display-buffer' routines to split a window." The default value is split-...
lawlist's user avatar
  • 19.1k

Only top scored, non community-wiki answers of a minimum length are eligible