Q 4.1-1) How do I print to the emacs-lisp interface created *common-lisp* buffer when I run my application in its own Lisp image?
Q 4.1-2) Can I connect a UNIX emacs to a Windows Lisp?
Q 4.1-3) Can I run Emacs on Windows and Lisp on UNIX?
Q 4.1-4) Why doesn't the emacs-lisp interface startup when I don't have a network connection?
Q 4.1-1) How do I print to the emacs-lisp interface created *common-lisp* buffer when I run my application in its own Lisp image?
A 4.1-1) You can do this by putting advice on the function excl:start-emacs-lisp-interface. The advice must, however, exist at the time the emacs-lisp interface is started, which means you will have to make a new Lisp image.
For example, put the following into a file, /tmp/test.cl:
(in-package :user) (defun doit () (sleep 3) (let* ((proc (multiprocessing:process-name-to-process #+mswindows "*common-lisp*" #-mswindows "Initial Lisp Listener")) (stream #+mswindows (mp::symeval-in-process '*standard-output* proc) #-mswindows (mp::symeval-in-stack-group '*standard-output* (mp::process-stack-group proc)))) (format stream "The emacs-lisp interface has started...~%") (force-output stream))) (advise excl:start-emacs-lisp-interface :after :eli-startup-print nil (doit))
start up Lisp and do this:
:cl /tmp/test.cl (dumplisp :name "/tmp/test.dxl")
and startup Lisp with the image you just created using M-x fi:common-lisp, and specifying /tmp/test.dxl as the image. You will then see
The emacs-lisp interface has started...
in the *common-lisp* buffer.
Q 4.1-2) Can I connect a UNIX emacs to a Windows Lisp?
A 4.1-2) Not in release 5.0 or earlier, but in release 5.0.1 and later, you can. Follow these instructions.
(excl:start-emacs-lisp-interface)
M-x set-variable RET fi:connect-to-windows RET tM-x fi:common-lisp RET RET <specify windows host> RET ...
You should now be connected to the Lisp running on Windows.
Q 4.1-3) Can I run Emacs on Windows and Lisp on UNIX?
A 4.1-3) No. The emacs-lisp interface does not currently support this.
Q 4.1-4) Why doesn't the emacs-lisp interface startup when I don't have a network connection?
A 4.1-7) Typically this is a not a problem on Unix, so we will discuss how to deal with this on Windows (but the Unix solution is similar).
The short answer is the startup is failing because the emacs-lisp interface does a lookup on the host localhost, looking in a Windows hosts file for a translation of localhost. If such a translation cannot be found, either because there is no hosts file or the hosts file does not contain a translation for localhost (to 127.0.0.1), then the ELI function fi:common-lisp will fail to startup lisp.
You can check if you have this problem by typing
ping localhost
to a DOS prompt (Windows 95/98/Me) or a Command prompt (Windows NT/2000): If the result is a message like host localhost not found, then you will not be able to use fi:common-lisp without further work.
There are two solutions:
127.0.0.1 localhost
There is a TAB between 127.0.0.1 and localhost. The <Windows directory> is often c:\windows\ but may be different on your machine.
(setq fi:common-lisp-host "127.0.0.1")
Next FAQ topic: 4.2. Lisp-Editor Protocol (LEP)
Previous FAQ topic: 3.9 Heap placement issues
ɠCopyright 1999, 2002, 2004 Franz Inc., Berkeley, CA. All rights reserved.
$Revision: 1.1.1.1 $