Search code examples
emacsprocesslispcommon-lispelisp

Common Lisp Inferior Lisp Buffer in Emacs


I am wondering why the Common Lisp buffer in Emacs is called "Inferior Lisp"? That is, inferior to what? What is the reason?

Also, is it correct to understand that that buffer is basically a shell that runs an implementation of Lisp, very similar to how one runs it in a terminal?

Lastly, how do things like SLIME and Slynk tie into this?


Solution

  • If you mean buffer *inferior-lisp, which is created by command inferior-lisp, then the meaning derives from the fact that it is the output of an "inferior" process.

    C-h f inferior-lisp tells you:

    Run an inferior Lisp process, input and output via buffer *inferior-lisp*.

    If there is a process already running in *inferior-lisp*, just switch to that buffer.

    With argument, allows you to edit the command line (default is value of ‘inferior-lisp-program’). Runs the hooks from inferior-lisp-mode-hook (after the comint-mode-hook is run).

    (Type ? in the process buffer for a list of commands.)

    And C-h v inferior-lisp-program tells you:

    Program name for invoking an inferior Lisp in Inferior Lisp mode.

    You can customize this variable.

    See the Emacs manual, node External Lisp (the node title is Running an External Lisp) for information about running an external Lisp session. It tells you, for example:

    You can run an external Lisp session as a subprocess or “inferior process” of Emacs, and pass expressions to it to be evaluated.

    The subprocess, or "inferior" process, is run from the Emacs process (session).

    See also this question and this question about "inferior" process/program/shell.