Skip to content

Controlling the Lisp Process Lifecycle

Neil Lindquist edited this page May 9, 2019 · 6 revisions

There are multiple commands for starting and accessing the Lisp Process. All of these commands are accessible from Atom's command palette (Ctrl+Shift+p) and from the Packages > SLIMA menu.

  • slime:start - Starts the Lisp process and connects to it
  • slime:connect - Connects (or reconnects) to a running Lisp process
  • slime:restart - Quits the current Lisp process, starts a new process, and connects to the new one.
  • slime:disconnect - Disconnects from the current Lisp process and kills it

In addition, if enabled in the settings, SLIMA will automatically start the lisp process. Additionally, closing the REPL tab will close the Lisp process. Note that the first time you use SLIMA, or if you update your lisp executable, you may get a warning messages about not being able to connect. This is normal; wait a minute or so, then run slime:connect. (This happens because lisp is compiling the swank server and isn't ready before this package times out). If this happens on a regular basis, consider increasing the number of connection attempts in SLIMA's advanced settings. Also, the current working directory for the lisp process is the directory of the active file when swank is started.

The command used to start the Lisp process can be configured from the SLIMA settings page. The basic setup takes a Lisp executable and the directory of the slime download. This will work for most commonly used Common Lisp implementations, and the default start-swank.lisp starter file. However, the process can be more carefully configured for users who need the control. First, if the slime path field points to a file instead of a directory, that file will be used instead of the start-swank.lisp file. Second, in the advanced features, there is a field to explicitly set the command used to start lisp. This is used as the command if it's not empty. The command is run by cmd or /bin/sh, and inherits the environment that Atom was launched in. SLIMA can be configured to connect to a swank server on a remote host or one configured to use a different TCP port in the settings page.

Example Commands

Linedit

The linedit package recommends running sbcl with the --no-linedit flag in Slime. So, setting the command to sbcl --no-linedit --load /path/to/slime/start-swank.lisp will allow this.

More Heap Size

Some applications require a larger heap than default. On SBCL, this can be configured with sbcl --dynamic-space-size 2560 --load /path/to/slime/start-swank.lisp

Qlot

Qlot allows for project specific Quicklisp distributions and provides a executable. So, you can run qlot with the current directory using qlot exec ros -S . run /path/to/slime/start-swank.lisp. Note that the directory of the active file is used as the current working directory.

You can’t perform that action at this time.