From: ws Wang
Subject: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <7b22037d.0410201527.1ee6b587@posting.google.com>
Can anybody please tell me how to save file in lisp, I am using cmucl.

Like I am using lisp interactively, i did a defun,  I want save the
newly created function to a file called newfunc.lisp,

No, I don't use emacs, or any editor, I am in lisp itself.

How do I do it? I'v googled but didn't found anything.

thanks

From: David Sletten
Subject: Re: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <nsDdd.13788$hN1.6159@twister.socal.rr.com>
ws Wang wrote:

> Can anybody please tell me how to save file in lisp, I am using cmucl.
> 
> Like I am using lisp interactively, i did a defun,  I want save the
> newly created function to a file called newfunc.lisp,
> 
> No, I don't use emacs, or any editor, I am in lisp itself.
> 
> How do I do it? I'v googled but didn't found anything.
> 
> thanks

Try DRIBBLE:
http://www.lispworks.com/reference/HyperSpec/Body/f_dribbl.htm

(dribble (open "my-file-for-my-lisp-code-since-i-am-not-using-emacs" 
:direction :output))

...do your stuff...

(dribble); Turns it off again.

But you really should be using emacs. You know you can use Lisp from 
within emacs, right?

David Sletten
From: ws Wang
Subject: Re: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <7b22037d.0410202318.6980f032@posting.google.com>
David Sletten <·····@slytobias.com> wrote in message news:<····················@twister.socal.rr.com>...
> ws Wang wrote:
> 
> > Can anybody please tell me how to save file in lisp, I am using cmucl.
> > 
> > Like I am using lisp interactively, i did a defun,  I want save the
> > newly created function to a file called newfunc.lisp,
> > 
> > No, I don't use emacs, or any editor, I am in lisp itself.
> > 
> > How do I do it? I'v googled but didn't found anything.
> > 
> > thanks
> 
> Try DRIBBLE:
> http://www.lispworks.com/reference/HyperSpec/Body/f_dribbl.htm
> 
> (dribble (open "my-file-for-my-lisp-code-since-i-am-not-using-emacs" 
> :direction :output))
> 
> ...do your stuff...
> 
> (dribble); Turns it off again.
> 
> But you really should be using emacs. You know you can use Lisp from 
> within emacs, right?
> 
> David Sletten


Thank you very much David.

In cmu lisp, it's simply
(dribble "transcript.txt")
...my stuff
(dribble) //optional

So it's like "script" on Unix. It save both input and result. This is
really helpful.

As for emacs, I tried, but gave up. I use vi(m) a lot, that's why.
From: Edi Weitz
Subject: Re: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <u4qko7bjh.fsf@agharta.de>
On 21 Oct 2004 00:18:16 -0700, ············@gmail.com (ws Wang) wrote:

> As for emacs, I tried, but gave up.

Maybe you should try again. SLIME alone is worth it.

> I use vi(m) a lot, that's why.

  <http://www.lisp-p.org/htdocs/15-vim/>
  <http://vim.sourceforge.net/scripts/script.php?script_id=221>

Edi.

-- 

Lisp is not dead, it just smells funny.

Real email: (replace (subseq ·········@agharta.de" 5) "edi")
From: lin8080
Subject: Re: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <417812F4.D95C15DC@freenet.de>
*.* schrieb:
> > As for emacs, I tried, but gave up.
And so do I.

Huch
A lot of "fence me in" "You have to.."
Am I in c.l.l. -hm?

But
when the editor is so important, why is it so, that clisp has none? Is
it possible to get a *super-super* (means feature overload) editor
inside the interpreter? (so you have to read years on the readmes till
you know whats going on (wasting time is fun, eh?).

You can find many high-level stuff inside the interpreter but no simple
edtitor to do the basics? Hard to belive this. Meanly as it is told to
take an interpreter and set up the editor, instead of take the
interpreter and let it eat the editor.

I think, the first question I ask the next lispner is about his editor
to get my aha-bong. Or should I go to the ground and say please solve
that editor-hang.

stefan
(wondering)

PS I once have a linux with emacs and xemacs. I find out: better do not
touch this byte-rake. It consumes lot of time to learn and when
something is not possible to do, you want to believe lisp can't do this,
but it is only a missing hotkey in emacs, why you can't do it. Is this
good? Today I use any kind of text editor to edit *.lisp. (small is
better here, because convenient kills important parts inside your brain)
From: Svein Ove Aas
Subject: Re: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <cl7k16$b7c$1@services.kq.no>
ws Wang wrote:

> Can anybody please tell me how to save file in lisp, I am using cmucl.
> 
> Like I am using lisp interactively, i did a defun,  I want save the
> newly created function to a file called newfunc.lisp,
> 
> No, I don't use emacs, or any editor, I am in lisp itself.
> 
That's no good. Take a look at this:
http://www.unmutual.info/startingwithcl.html

> How do I do it? I'v googled but didn't found anything.
> 
Generally speaking, you're supposed to use Lisp from withing an editor. 
From: Thomas A. Russ
Subject: Re: Newbie question: how to save file in lisp(cmucl)
Date: 
Message-ID: <ymiy8hy8fil.fsf@sevak.isi.edu>
············@gmail.com (ws Wang) writes:

> 
> Can anybody please tell me how to save file in lisp, I am using cmucl.
> 
> Like I am using lisp interactively, i did a defun,  I want save the
> newly created function to a file called newfunc.lisp,
> 
> No, I don't use emacs, or any editor, I am in lisp itself.
> 
> How do I do it? I'v googled but didn't found anything.

Generally, you don't.  It can't reliably be done.

Now, you may be lucky and find that FUNCTION-LAMBDA-EXPRESSION returns
something useful, but the standard doesn't require this to return
anything the lambda expression.  It can return NIL.

But generally your best bet is to either use Lisp out of something like
Emacs, in which case it is already available to you, or to use whatever
other IDE your Lisp vendor provides.

> thanks

-- 
Thomas A. Russ,  USC/Information Sciences Institute