This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.

Saving my work ,effectively, in lisp-in-a-box?

6 posts · 7955 views

Hi,

I'm learning this brilliant language and i'm using lisp-in-a-box. One "problem" i have is when want to save what i write.

Do i really need to create a new file and write the code again in that file? Is there not a more effective way?

Re: Saving my work ,effectively, in lisp-in-a-box?

You posted in Emacs Lisp forum, but as far as I know lisp-in-a-box is a Common Lisp implementation bundled with Emacs? Which Lisp are you using (Emacs Lisp and Common Lisp are quite different). In any case, write your definitions in a file in the first place and load the files (or single forms using appropriate Emacs commands), rather than writing into the REPL or scratch buffer.

Re: Saving my work ,effectively, in lisp-in-a-box?

Well, it looks like you are struggling with Emacs. Try Emacs' tutorial. When you open Emacs, there should be a link to it, or you can start it hitting C-h t (hold the Ctrl button and press H, then release and press T) or from the Help menu.

To open a file, use C-x C-f (hold Ctrl, press x, hold Ctrl and press f). Always open a file to create a new file. To save, C-x C-s. You can also save / open from the File menu.

Emacs is very powerful once you learn it, but, if you want a more standard editor, you can try Cusp, a plugin for Eclipse (take a look at this tutorial).

Re: Saving my work ,effectively, in lisp-in-a-box?

kapalua wrote:Hi,

I'm learning this brilliant language and i'm using lisp-in-a-box. One "problem" i have is when want to save what i write.

Do i really need to create a new file and write the code again in that file? Is there not a more effective way?
Don't write code in the REPL. It's just for throwaway stuff. Type in a buffer to begin with. Use Emacs's help functions to see what C-c C-c and C-c C-k do when in Lisp mode.

Re: Saving my work ,effectively, in lisp-in-a-box?

Sorry about posting in incorrect forum and many thanks for the answers!

Re: Saving my work ,effectively, in lisp-in-a-box?

See also DRIBBLE. It saves a log of your REPL. Then you can still work iteratively in the repl and later retrieve useful snippets to put in a file.
http://www.lispworks.com/documentation/ ... dribbl.htm

I thought someone (Pascal Bourguignon?) had an enhanced dribble, but couldn't find it.