FunctionPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version

new-start-emacs-lisp-interface

Arguments: &key (background-streams t) (listener-number 1) port announce-to-file

This function starts the emacs-lisp interface.

Users do not typically call this function. Lisp is typically started as a subprocess of Emacs with the Emacs function fi:common-lisp, or perhaps with a custom Emacs function that itself calls fi:common-lisp. (See Functions and variables for Interacting with a CL subprocess in eli.htm for a discussion of fi:common-lisp and examples of custom functions.) When Lisp is started in that way, new-start-emacs-lisp-interface is called automatically and transparently. (See also Running Lisp as a subprocess of Emacs in startup.htm.)

When a Lisp is started with fi:common-lisp, then this expression:

-e (new-start-emacs-lisp-interface)

(or an equivalent form) is made a command line argument to Lisp. If, because command-line arguments are ignored, the Emacs-Lisp interface does not start up (or if it does not start up for any other reason), you can start it directly from within Lisp by calling this function.

The arguments are:

The typical form that will start the Emacs-Lisp interface is:

(excl:new-start-emacs-lisp-interface)

It is not an error to call this function when the Emacs-Lisp interface is in fact running. Doing so will cause some printing to the listener but have no other effect.

Starting the interface after Lisp is already running

You can start the interface after Lisp has been started, typically not in Emacs, with this function and the emacs-lisp interface function fi:start-interface-via-file. This is typically done for debugging a running but apparently broken process. To do this, in Lisp call a form like:

(excl:start-emacs-lisp-interface :port 7666 :announce-to-file "~/.eli-startup")

We have not specified a value for the listener-number, so the default 1 is used (if a *common-lisp* already exists and uses 1, specify a different number), or for background-streams, so the default t is used. The value given for port is 7666 (it can be any valid port number on the machine that is not already in use and can be nil, which causes the system to choose an appropriate port number), and the value for announce-to-file is the file that will be used (it must not exist; it will be created for this call). Then, sometime later on the emacs side, do this (the host is "pie"):

(fi:start-interface-via-file "pie" "*common-lisp*" "~/.eli-startup")

The arguments are the host running Lisp, the buffer name, and the filename.

See eli.htm for information on the Emacs-Lisp interface.

This function does not work with the 6.2 version of the Emacs-Lisp interface

It may be that you are running Allegro CL 7.0 but (for whatever reason) using the version of the Emacs-Lisp interface distributed with Allegro CL 6.2, and you want to connect Emacs to an already running Lisp. In that unusual case, you should use the obsolete function start-emacs-lisp-interface rather than this function. The version of the emacs-lisp interface is stored in the emacs variable fi:emacs-lisp-interface-version. If the value of that variable is "3.9" or greater, you are using the 7.0 interface.


Copyright (c) 1998-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.2. This page was not revised from the 8.1 page.
Created 2010.1.21.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.2
Unrevised from 8.1 to 8.2.
8.1 version