[CM] xcm file (again)

Juan Reyes juanig@ccrma.Stanford.EDU
Tue, 13 May 2003 10:24:44 -0700 (PDT)


Andres,

I might have forgotten that in order to run the CM image you need a Lisp
binary. The CM or XCM scripts are different from the CM-Image. The
CM-Image contains all the Lisp functions to run CM. The scripts are just
Unix commands to run the Lisp processes or whatever. In this way you can
edit the CM script by yourself.

In Linux if you have compiled and installed Clisp the binary might be in
/usr/bin/clisp or /usr/local/bin/clisp. Once you have this binary you
should edit the CM or XCM scripts to reflect the actual path of clisp and
the cm-image in your computer and create a link or put it in one of the
binary directories, may be /usr/local/bin. The actual script should look
like the example on the CM documentation but with your paths. Something
like: 
"/sw/bin/clisp -I -M /Lisp/bin/cm-2.4.0/clisp/cm.mem -i or
"/usr/share/clisp -I -M /usr/local/cm-2.4.0/bin/cm.mem

To test the script on the bash shell you can test the CM command just by
typing it provided you have the right permissions. On the c-shell you
need to rehash and then test it. Clisp should load with the CM image on
it. To find that out you can type the (cm-version) function and Lisp
should give you the correct version you already compiled.  

Beware that in Xemacs you might need to download and compile the Lisp
major mode in order to have Lisp indentation (this might be the case in 
the 
windoze version and in some Linux distributions).

Once you have the script running you should edit the .emacs file in your 
home directory and add a line that looks like:
 (setq clisp-program "/usr/local/bin/cm")   which points to your CM script
or may be 
 (defun clisp () (inferior-lisp clisp))

In this way you use the meta-key in emacs to eval the clisp which launches 
an inferior-lisp process.

In other days we used the following lines in the .emacs files:

(setq acl-image  "/usr/local/bin/cm-image")

and then launch the inferior-lisp process by C-x l but you need the
following key-bindings (as mentioned by Rick) that you can use as example

(progn
      (require 'inf-lisp)
      (setq inferior-lisp-program cm-image)
      (setq explicit-shell-file-name "/bin/tcsh")
      (setq common-lisp-buffer-name "*common-lisp*")
      ;; change some key bindings
      (global-set-key "\C-c\C-r" 'lisp-eval-region)
      (global-set-key "\C-c\C-s" 'lisp-eval-last-sexp)
      (global-set-key "\C-c\C-e" 'lisp-eval-defun)
      (global-set-key "\C-c\C-m" 'lisp-macroexpand)
      (global-set-key "\C-c\C-b" 'lisp-eval-current-buffer)
      (global-set-key "\C-x\l"   'inferior-lisp)
      (global-set-key "\C-c\C-l" 'lisp-mode)
      (global-set-key "\C-c\C-o" 'outline-minor-mode)
      (global-set-key "\M- " 'fixup-whitespace)
      (global-set-key "\M-s" 'ispell-region)
      (global-set-key "\M-f" 'fill-region)
      )


  -- Juan 


On 13 May 2003, Juan Reyes wrote:

> > 
> > I tried to find the `xcm' script file and not found it! so I have some
> > questions?
> > 
> 
> If the Xcm script doesn't work (or if you can't find it) you should try
> the cm script under Xemacs it works very well for under Clisp, ACL \&
> cmucl. Of course as an inferior Lisp process in a different frame and
> all the key bindings documented in the CM distribution.
> 
>   __* Juan
> 
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist@ccrma.stanford.edu
> http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
>