From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: how to learn lisp Date: Tue, 21 Oct 2008 17:57:35 +1100 Organization: Rapt Technologies Message-ID: <87r66ah1uo.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1224574946 8916 80.91.229.12 (21 Oct 2008 07:42:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 21 Oct 2008 07:42:26 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 21 09:43:24 2008 connect(): Connection refused Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KsBsW-0007rZ-I9 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Oct 2008 09:42:08 +0200 Original-Received: from localhost ([127.0.0.1]:53176 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KsBrR-0007lj-40 for geh-help-gnu-emacs@m.gmane.org; Tue, 21 Oct 2008 03:41:01 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!news.astraweb.com!border1.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:TMFwGvE/TLOnoT3yKHGyafVFX4o= Original-Lines: 41 Original-NNTP-Posting-Host: 555394cb.news.astraweb.com Original-X-Trace: DXC=`2kGTR`=ZX:R1V9cQHRMoB]eW^R:=gEmG\mPb9?Y4lE7Q Original-Xref: news.stanford.edu gnu.emacs.help:163632 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:58971 Archived-At: TheFlyingDutchman writes: > On Oct 12, 9:34 pm, "jacklisp" 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