help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to learn lisp


From: Tim X
Subject: Re: how to learn lisp
Date: Tue, 21 Oct 2008 17:57:35 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

TheFlyingDutchman <zzbbaadd@aol.com> writes:

> On Oct 12, 9:34 pm, "jacklisp" <jackl...@gmail.com> wrote:
>> how to learn lisp
>
> I have studied the Emacs Lisp manual on more than one occassion and
> never got much past evaluating (+ 2 2) in a buffer. But recently I was
> looking to modify my .emacs file and came across something that I
> wasn't aware of that I find very helpful for learning the Lisp part of
> Emacs Lisp (as opposed to the "Emacs API" part of Emacs Lisp). So if
> you haven't seen it yet, there is a -batch option for starting up
> Emacs. If you create an Emacs Lisp file, for example - hello_world.el
> - you can then execute this file in the same manner you would execute
> a Perl/Python/Ruby/Tcl script by typing "emacs -batch -l
> hello_world.el". In batch mode the (message ... ) function acts like a
> print/printf statement in other languages, so you can start with
> (message "%s" "hello world") and go on from there the way you
> typically would learning a standalone language.

An alternative and useful way to start playing with elisp that is faster
than running scripts with batch mode is IELM mod (e.g. m-x ielm). It
provides an elisp REPL where you can evaluate various elisp forms.

,----[ C-h f ielm RET ]
| ielm is an interactive compiled Lisp function in `ielm.el'.
| 
| (ielm)
| 
| Interactively evaluate Emacs Lisp expressions.
| Switches to the buffer `*ielm*', or creates it if it does not exist.
| 
| [back]
`----

HTH

Tim


-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]