From: Nonzero
Subject: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <5d8568f8.0110171613.c0eb373@posting.google.com>
First off, allow me to appologize for how much of a newbie I am.

OK, here is my problem:

I am just getting started with LISP and Linux.  I can open the Emacs
editor, I can get it into LISP mode, but how do I get it to evaluate a
statement or run a program.  I keep getting the error message: No Lisp
Subprocesses

Thank you in advance for any help you may provide.

-Nonzero314

From: Gabe Garza
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <lmi923jc.fsf@kynopolis.org>
··········@hotmail.com (Nonzero) writes:


> I am just getting started with LISP and Linux.  I can open the Emacs

   You don't say which Lisp you're trying to get started with. There are
quite a few different dialects; this discussions in this newsgroup
nearly always concern the dialect called "Common Lisp."  I'm assuming
that's what you're interested in because it's the best. ;) The other
dialect I thought you might be thinking of is Emacs Lisp, which is the 
dialect that most of Emacs is written in.  

   You can find a *wealth* of information on Common Lisp, including 
pointers to several good introductions, at www.lisp.org.

> editor, I can get it into LISP mode, but how do I get it to evaluate a
> statement or run a program.  I keep getting the error message: No Lisp
> Subprocesses
 
That message means that you're not running a Lisp system for emacs to feed
expressions into.  This is necessary if you want to use Emacs to program
a Lisp other then Emacs Lisp.  The package you want for Common Lisp is
ilisp, which you can learn about at:
   
    http://sourceforge.net/projects/ilisp/

If you're using ilisp, you start an inferior Lisp by type 
"M-x <name of lisp>", so if you're using CMUCL, you'd type "M-x cmulisp".
If you're using clisp, you'd type "M-x clisp".  Those are the two free
Common Lisp systems I'd recommend.  Make sure you've installed one with
whatever mechanism your Linux distribution provides.

Gabe
From: ········@acm.org
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <kLpz7.5036$3v.700192@news20.bellglobal.com>
··········@hotmail.com (Nonzero) writes:
> First off, allow me to appologize for how much of a newbie I am.

> OK, here is my problem:

> I am just getting started with LISP and Linux.  I can open the Emacs
> editor, I can get it into LISP mode, but how do I get it to evaluate
> a statement or run a program.  I keep getting the error message: No
> Lisp Subprocesses

Could you elaborate on what one of those programs might be?  That
would be quite helpful in better directing your question.

1.  If the program is written in Emacs Lisp, then you should head to
one of the Emacs newsgroups for suggestions; Elisp is _usually_ not
used in quite the way it sounds as though you're thinking.  

Usually it's used to integrate snips of code into Emacs, and the
notion of "running a program" doesn't make sense in that context.

2.  More likely, you're trying to write code in either Common Lisp or
Scheme, and want to run _that_.

In such a case, you'll want to start up a buffer that is attached to a
Lisp/Scheme process.

Common methods of doing this would include things like the following:

M-x run-lisp
M-x run-scheme
M-x run-ilisp (it then asks for a dialect; hit tab for a list)
M-x clisp-hs 

You can then load in Lisp code into such a session, via:
  (load "whatever-file-I'm-working-on.lisp") 

and either copy/paste bits of code from the program buffer into the
session buffer, or even by selecting code in the program buffer and
asking it to be run in the Lisp session.

For more details, check the Emacs documentation for "Major Modes for
Lisp."
-- 
(reverse (concatenate 'string ··········@" "enworbbc"))
http://www.cbbrowne.com/info/wp.html
MICROS~1: The company that brought new meaning to "Nervous System"
From: Fredrik A. Kavli
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <fredrik.andersen-1810010904520001@1etg1.hit.uib.no>
In article <···························@posting.google.com>,
··········@hotmail.com (Nonzero) wrote:

> First off, allow me to appologize for how much of a newbie I am.
> 
> OK, here is my problem:
> 
> I am just getting started with LISP and Linux.  I can open the Emacs
> editor, I can get it into LISP mode, but how do I get it to evaluate a
> statement or run a program.  I keep getting the error message: No Lisp
> Subprocesses
> 
> Thank you in advance for any help you may provide.
> 
> -Nonzero314

Hello Nonzero.

I am kind of a newbie myself, at least when it comes to running LISP on
LINUX.  I too had some problems with starting up ACL (Allegro CL) when
switching from MCL on my Mac to ACL on my Linux.  

What I needed to do was to edit the .emacs file in my home directory.  In
this file I specified LISP to kill when quitting Emacs, which LISP to load
and so on.

I wanted the Case Insensitive version on ACL to autorun each time I
started Emacs from the terminal without the -q option.  A sample of this
part of my .emacs is as follows:

(setq fi:common-lisp-image-name "usr/bin/Wherever/Your/Copy/is/Placed/alisp/")
(setq fi:common-lisp-host "name.of.server" / "local")

For being able to autorun CL when starting Emacs, Try something like this:

(defun run-common-lisp ()
  (interactive)
  (fi:common-lisp fi:common-lisp-buffer-name
                  fi:common-lisp-directory
                  fi:common-lisp-image-name
                  fi:common-lisp-image-arguments
                  fi:common-lisp-host))

For setting up a keybinding for the command "run-common-lisp" from Emacs,
you would want something like this in your .emacs-file:

(progn
  (setq ctlx-3-map (make-keymap))
  (define-key ctl-x-map "3" ctlx-3-map)
  (define-key ctlx-3-map "1" "run-common-lisp"))

or the following:

(define-key global-map "(backslash)C-xl" 'run-common-lisp)

(sorry for the missing backslash above - The key is somewhat missing from
my keyboard)

I do not know which version of LISP you are running, but I find the ACL a
good choice.  It's free from Allegro, but limited for 60 days usage,
before the trial-edition must be renewed.  The renewal is also free, and
no reinstallation of any kind is necessary.  It's just a matter of
obtaining a new trial-registration from Allegro, and putting it in your
LISP-directory.  Allegro also supplies some sample .emacs files, actually
this was where I found my solution.  In the ACL-package, there's also a
copy of emacs made to fit ACL, that is, with some different menu options
compared to the standard Emacs.

Hope this helps a bit.

Fredrik.
From: ········@irtnog.org
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <w4ou1ww63jd.fsf@eco-wks5.cinci.irtnog.org>
>>>>> "Nonzero" == Nonzero  <··········@hotmail.com> writes:

    Nonzero> I am just getting started with LISP and Linux.  I can
    Nonzero> open the Emacs editor, I can get it into LISP mode, but
    Nonzero> how do I get it to evaluate a statement or run a program.
    Nonzero> I keep getting the error message: No Lisp Subprocesses

Don't feel too bad about struggling with Emacs.

1. In your .emacs file, set the variable "inferior-lisp-program" to
   the name of your Lisp's executable, for example:

	(setq inferior-lisp-program "/usr/bin/lisp")

2. Re-start emacs.

3. Start the Lisp subprocess by typing the command "M-x inferior-lisp
   RET".

4. Open a Lisp file in another window (C-x 4 f file.lisp RET).  To
   execute an expression from the source file in the subprocess,
   position your cursor at the end of the expression and type "C-x
   C-e".  For example:

	(+ 1 2)
	       ^
	       |
	       put cursor here and type "C-x C-e" to evaluate "(+ 1 2)"
	       to the Lisp subprocess
			       

       	very-long-symbol-name
       	       ^
	       |
	       "C-x C-e" here will send "very-lo" to the Lisp subprocess

5. If you already have a Lisp file open, and "inferior-lisp-program"
   is set correctly, you can type "C-c C-z" in the Lisp file buffer to
   start the subprocess.

Other packages (like Ilisp) have more features, but inf-lisp works for
me pretty well (with Corman Lisp and CMUCL).

You'll want to download a copy of Eric Naggum's "hyperspec.el" file at
some point as well.  I use it with Emacs/W3, a web browser inside
Emacs.  If you can't find a copy of "hyperspec.el" or Emacs/W3 on the
web, send me an email.

--
"His power lies apparently in his ability to choose incompetent
enemies." - Crow T. Robot, MST3K, "Prince of Space"
From: H�kon Alstadheim
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <m0bsj4pjhp.fsf@alstadhome.cyberglobe.net>
········@irtnog.org writes:

> >>>>> "Nonzero" == Nonzero  <··········@hotmail.com> writes:
> 
>     Nonzero> I am just getting started with LISP and Linux.  I can
>     Nonzero> open the Emacs editor, I can get it into LISP mode, but
>     Nonzero> how do I get it to evaluate a statement or run a program.
>     Nonzero> I keep getting the error message: No Lisp Subprocesses
> 
> Don't feel too bad about struggling with Emacs.
> 
> 1. In your .emacs file, set the variable "inferior-lisp-program" to
>    the name of your Lisp's executable, for example:
> 
> 	(setq inferior-lisp-program "/usr/bin/lisp")
> 
[ other stuff elided ]

xenophon gives the least involved (i.e. simplest) approach so far, I'd
go with that, at least for a start. There is one additional stumbling
block though. The default indentation in lisp-mode buffers is really
tailored for elisp, not lisp. To fix that add the following to your
.emacs:


(defun my-lisp-mode-callback nil
  "To be put in lisp-mode-hook"
  (interactive)
  (setq lisp-indent-function 'common-lisp-indent-function))

(add-hook 'lisp-mode-hook #'my-lisp-mode-callback)

-- 
H�kon Alstadheim, Montreal, Quebec, Canada  
From: ········@irtnog.org
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <w4olmi3jvwp.fsf@eco-fs1.cinci.irtnog.org>
>>>>> "H�kon" == H�kon Alstadheim <·····@cyberglobe.net> writes:

    H�kon> The default indentation in lisp-mode buffers is really
    H�kon> tailored for elisp, not lisp. To fix that add the following
    H�kon> to your .emacs:

I prefer to use the CUSTOMIZE facility, but the effect is the same:

(custom-set-variables
 ...
 '(lisp-indent-function (quote common-lisp-indent-function) t)
 ...)

COMMON-LISP-INDENT-FUNCTION also doesn't indent IF the way I like:

;;; Fix up indentation for Scheme and Common Lisp programs
(put 'variant-case 'scheme-indent-function 1)
(load-library "cl-indent")		;hack so put works
(put 'if 'common-lisp-indent-function '(nil nil &body))

If anyone (including the original poster) would like a copy of my
.emacs file (and the associated Lisp code), please email me (note
Reply-to in the header, my primary email isn't currently working).

This thread should probably be moved to comp.emacs.

-- 
"His power lies apparently in his ability to choose incompetent
enemies." - Crow T. Robot, MST3K, "Prince of Space"
From: Nonzero
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <2e3cbcd8.0110191644.4ce84ff6@posting.google.com>
Hello All.

First off, I want to thank everyone who replied.  I really appreciate
it.

But...

I still can't get things to work (I blame this on my lack on knowledge
of Linux/Emacs and not your instruction)

Allow me to clarify my goals.  I am a college student.  I recently saw
a presentation on genetic programming and I decided to get involved. 
So I wan't to use Common lisp to program in.

I switched to Linux because I hate Windows XP

So this is what I tried:
I downloaded the ilisp from the webpage and unziped it.
I copied the files cmulisp.lisp and ilisp-cmu.el to /usr/bin
In my /home/me/.emacs file I added the line:
(setq inferior-lisp-program "/usr/bin/cmulisp.lisp")
restarted emacs
Typed M-x inferior-lisp
got the error: Process inferior-lisp exited abnormally with code 1
Changed the above line to read:
(setq inferior-lisp-program "/usr/bin/ilisp-cmu.el")
restarted emacs
Same error.

I hope someone can help me out because I am really eager to start work
on the Genetic Programming (I have a big pile of books gather dust
while I try to get emacs functional)

Thank you again everyone.

-Nonzero
From: Thomas F. Burdick
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <xcv4rouokyj.fsf@apocalypse.OCF.Berkeley.EDU>
··········@hotmail.com (Nonzero) writes:

> Hello All.
> 
> First off, I want to thank everyone who replied.  I really appreciate
> it.
> 
> But...
> 
> I still can't get things to work (I blame this on my lack on knowledge
> of Linux/Emacs and not your instruction)
> 
> Allow me to clarify my goals.  I am a college student.  I recently saw
> a presentation on genetic programming and I decided to get involved. 
> So I wan't to use Common lisp to program in.
> 
> I switched to Linux because I hate Windows XP

Linux is a kernel, and there are many distros built around it.  They
vary in quality for various purposes, and differ in how easy they are
to install and/or administer on different hardware ... however:
USE DEBIAN

It's my preferred distro, but even if I disliked it failed on every
other front, it wins big time when it comes to lisp.  The major free
linux Lisp implementations (CMUCL, CLISP, GCL) are packages, as is
ILISP for Emacs!  Plus, cCLan uses debian packages, which adds lots of
useful stuff.  If your major use for your linux box is Lisp, do
yourself a favor, and use debian.

-- 
           /|_     .-----------------------.                        
         ,'  .\  / | No to Imperialist war |                        
     ,--'    _,'   | Wage class war!       |                        
    /       /      `-----------------------'                        
   (   -.  |                               
   |     ) |                               
  (`-.  '--.)                              
   `. )----'                               
From: Christopher B. Browne
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <wF5A7.13021$os1.2442103@news20.bellglobal.com>
··········@hotmail.com (Nonzero) writes:
> First off, I want to thank everyone who replied.  I really appreciate
> it.
> 
> But...
> 
> I still can't get things to work (I blame this on my lack on knowledge
> of Linux/Emacs and not your instruction)

> Allow me to clarify my goals.  I am a college student.  I recently
> saw a presentation on genetic programming and I decided to get
> involved.  So I wan't to use Common lisp to program in.

Fair enough.

> I switched to Linux because I hate Windows XP

I didn't think it was released yet, but no matter...

> So this is what I tried:
> I downloaded the ilisp from the webpage and unziped it.
> I copied the files cmulisp.lisp and ilisp-cmu.el to /usr/bin
> In my /home/me/.emacs file I added the line:
> (setq inferior-lisp-program "/usr/bin/cmulisp.lisp")
> restarted emacs

There lies one error, and one misconception:

Error:

  You've set things up to try to run something that's not a Lisp
  interpreter/environment.

  On my system, the line would be:
  (setq inferior-lisp-program "/usr/bin/lisp")

  On your system, at the command line (e.g. - nothing to do with
  Emacs!), see what command you run to get a Lisp session running.  It
  might be one of the following:

  % lisp
  % clisp
  % cmucl

  Whichever it is, determine the full pathname, using "which".

  e.g. - if the command you ran was "lisp", then:
  % which lisp
  and it'll report back something like:
  /usr/bin/lisp
    or
  /usr/local/bin/lisp
    or
  /usr/share/university/somewhere-odd/extensions/compilers/cmu-cl/lisp

  Whichever of those prove to be what you find, put that into the 
  (setq inferior-lisp-program "where-ever-the-which-reported-it-to-be")

And that should resolve the "error" part.

Misconception: 

  The other thing...  You didn't need to restart Emacs.  You could
  have pointed to the line (e.g. - head to the start, and press
  C-space, then head to the end), and then invoke the command M-x
  eval-region.

  At that point, inferior-lisp-program would be set to whatever you
  typed in, and you'd be free to continue.
-- 
(reverse (concatenate 'string ·············@" "enworbbc"))
http://www.cbbrowne.com/info/advocacy.html
Rules of the Evil Overlord #217. "If I'm wearing the key to the hero's
shackles around  my neck and  his former girlfriend now  volunteers to
become my mistress and we are all alone in my bedchamber on my bed and
she offers  me a goblet of  wine, I will politely  decline the offer."
<http://www.eviloverlord.com/>
From: Nonzero
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <2e3cbcd8.0110192323.2a84ab8e@posting.google.com>
>   On your system, at the command line (e.g. - nothing to do with
>   Emacs!), see what command you run to get a Lisp session running.  It
>   might be one of the following:
> 
>   % lisp
>   % clisp
>   % cmucl
> 


None of these commands do anything at the command prompt.  Is there
anyway I can find out what will get me into a 'lisp session'?
From: Dr. Edmund Weitz
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <m34rouwx08.fsf@bird.agharta.de>
You might not have a Lisp system installed at all. This'll depend on
your distribution (Debian? SuSE? Mandrake? Red Hat?) and what gets
installed by default. Recent Mandrake and SuSE CDs/DVDs have CLISP on
it, you will only have to install it, it doesn't get installed by
default. With Debian, you'll be able to install CLISP (or CMUCL if you
switch to the 'testing' branch) with apt-get. I don't know about Red
Hat.

You might want to try 'apropos lisp' at a console prompt and see what
you get.



··········@hotmail.com (Nonzero) writes:

> >   On your system, at the command line (e.g. - nothing to do with
> >   Emacs!), see what command you run to get a Lisp session running.  It
> >   might be one of the following:
> > 
> >   % lisp
> >   % clisp
> >   % cmucl
> > 
> 
> 
> None of these commands do anything at the command prompt.  Is there
> anyway I can find out what will get me into a 'lisp session'?
From: Rahul Jain
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <877ktptity.fsf@photino.sid.rice.edu>
···@agharta.de (Dr. Edmund Weitz) writes:

> With Debian, you'll be able to install CLISP (or CMUCL if you
> switch to the 'testing' branch) with apt-get.

Debian stable has cmucl, too.

Debian unstable has cmucl with common-lisp-controller, unlike the ones
in stable or testing. This allows lisp source to be automatically
compiled for each compiler you have installed if it's properly set
up. CCLAN uses this mechanism to make installing lisp libraries and
programs easy and immune to FASL format changes.

-- 
-> -/-                       - Rahul Jain -                       -\- <-
-> -\- http://linux.rice.edu/~rahul -=- ·················@usa.net -/- <-
-> -/- "I never could get the hang of Thursdays." - HHGTTG by DNA -\- <-
|--|--------|--------------|----|-------------|------|---------|-----|-|
   Version 11.423.999.220020101.23.50110101.042
   (c)1996-2000, All rights reserved. Disclaimer available upon request.
From: John Paul Wallington
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <87k7xraqpl.fsf@bundalo.shootybangbang.com>
··········@hotmail.com wrote:
 
> I still can't get things to work (I blame this on my lack on
> knowledge of Linux/Emacs and not your instruction)

This is probably a foolish question, but do you have cmucl installed?

> So this is what I tried:
> I downloaded the ilisp from the webpage and unziped it.

ilisp isn't inferior-lisp-mode.  It's an altogether froodier, more
complex, interface.

> I copied the files cmulisp.lisp and ilisp-cmu.el to /usr/bin

I don't think you should do this.  They should stay in the ilisp
package's directory.  Did you follow the instructions in the
INSTALLATION file after you unpacked the ilisp archive?

> In my /home/me/.emacs file I added the line:
> (setq inferior-lisp-program "/usr/bin/cmulisp.lisp")

The variable inferior-lisp-program refers to your lisp's program
name - what you would type at the shell to get a read-eval-print loop.
It defaults to "lisp", which is normally a sane guess for cmucl.

-- 
John Paul Wallington
From: Daniel Barlow
Subject: Re: Newbie Needs Help with LISP on Linux Emacs
Date: 
Message-ID: <87itdaa1lp.fsf@noetbook.telent.net>
··········@hotmail.com (Nonzero) writes:

> Allow me to clarify my goals.  I am a college student.  I recently saw
> a presentation on genetic programming and I decided to get involved. 
> So I wan't to use Common lisp to program in.

Once upon a time I wrote a step-by-step howto document on getting
started with common lisp using linux, emacs, cmucl and ilisp.  It's
out of date in the detail parts these days (version numbers have
changed, ftp site locations may have moved) but you might still find
it useful as an overall guide to what components you need to install
and how they fit together.  It's at

 http:/ww.telent.net/lisp/howto.html


-dan

-- 

  http://ww.telent.net/cliki/ - Link farm for free CL-on-Unix resources