Search code examples
emacslispelispess

What's so inferior about inferior-lisp?


As I've started learning about lisp, emacs, and ess (Emacs Speaks Statistics), I've come across this concept of inferior-this-or-that. For instance, there's an inferior-ess-mode, inferior-lisp, and Inferior Emacs Lisp Mode.

In all these cases, it seems that some interpreted language is running within emacs, and you can interact with it within a buffer. But why are they inferior and what are they inferior to?


Solution

  • An inferior mode refers to a mode which run as a subprocess of emacs.

    For example, this is my process tree when I start emacs:

    $ pstree 62238
    --= 62238 smt /usr/local/Cellar/emacs/HEAD/Emacs.app/Contents/MacOS/Emacs
    

    After I run an inferior tcl shell, this is what my process tree looks like:

    $ pstree 62238
    -+= 62238 smt /usr/local/Cellar/emacs/HEAD/Emacs.app/Contents/MacOS/Emacs
     \-+= 62359 smt /bin/sh /usr/bin/wish
       \--- 62361 smt /usr/bin/../../System/Library/Frameworks/Tk.framework/Version
    

    Another way of saying this might be that "inferior" is synonymous with the prefix "sub-" in this context.