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?
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.
I think the Inferior Emacs Lisp Mode (ielm) is a wrong name. That should be named Interactive Emacs Lisp Mode. With ielm Emacs Lisp is not running as an inferior Lisp. It is a read eval print loop for the built-in Emacs Lisp. GNU Emacs really names it Inferior Emacs Lisp Mode, but if you look at the sources, it uses directly the built-in Emacs Lisp eval
to evaluate the expressions. It just reuses some infrastructure (comint) for dealing with inferior interpreters (like Lisps, shells, ...).
Generally Inferior Lisp means that it is a (often external) Lisp system under control from Emacs. It also does not need to be Emacs Lisp. Usually it is some other Lisp dialect like Common Lisp. Common Lisp has/had several extensions to Emacs and Common Lisp, so that it runs as an inferior Lisp with a lot of functionality of a Lisp development environment (debugger, inspector, source locator, ...):
Emacs also has a simple built-in facility for running an inferior Lisp: External Lisp.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With