* how to learn lisp @ 2008-10-13 4:34 jacklisp 2008-10-13 8:01 ` Jordan Greenberg ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: jacklisp @ 2008-10-13 4:34 UTC (permalink / raw) To: help-gnu-emacs how to learn lisp ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-13 4:34 how to learn lisp jacklisp @ 2008-10-13 8:01 ` Jordan Greenberg 2008-10-13 13:52 ` William Case 2008-10-21 5:36 ` TheFlyingDutchman 2 siblings, 0 replies; 10+ messages in thread From: Jordan Greenberg @ 2008-10-13 8:01 UTC (permalink / raw) To: help-gnu-emacs http://tinyurl.com/6qz5kn ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-13 4:34 how to learn lisp jacklisp 2008-10-13 8:01 ` Jordan Greenberg @ 2008-10-13 13:52 ` William Case 2008-10-21 5:36 ` TheFlyingDutchman 2 siblings, 0 replies; 10+ messages in thread From: William Case @ 2008-10-13 13:52 UTC (permalink / raw) To: jacklisp; +Cc: help-gnu-emacs Hi; On Mon, 2008-10-13 at 12:34 +0800, jacklisp wrote: > how to learn lisp It depends on how green you are to programming etc. When I started using emacs I knew nothing. In fact, I started using emacs in order to learn something about 'C', my first attempt at a programming language. What worked for me was first: http://www.gnu.org/software/emacs/emacs-lisp-intro/html_node/index.html to start with the simplest concepts. Then on the emacs menu: Help => More Manuals => Introduction to Emacs Lisp Then practise, practise, until the 'eureka' moment. It doesn't take too long for that moment to arrive. -- Regards Bill Fedora 9, Gnome 2.22.3 Evo.2.22.3.1, Emacs 22.2.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-13 4:34 how to learn lisp jacklisp 2008-10-13 8:01 ` Jordan Greenberg 2008-10-13 13:52 ` William Case @ 2008-10-21 5:36 ` TheFlyingDutchman 2008-10-21 6:57 ` Tim X 2008-10-22 7:37 ` Xah 2 siblings, 2 replies; 10+ messages in thread From: TheFlyingDutchman @ 2008-10-21 5:36 UTC (permalink / raw) To: help-gnu-emacs 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. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-21 5:36 ` TheFlyingDutchman @ 2008-10-21 6:57 ` Tim X 2008-10-22 0:25 ` Xavier Maillard [not found] ` <mailman.1753.1224635369.25473.help-gnu-emacs@gnu.org> 2008-10-22 7:37 ` Xah 1 sibling, 2 replies; 10+ messages in thread From: Tim X @ 2008-10-21 6:57 UTC (permalink / raw) To: help-gnu-emacs 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 ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-21 6:57 ` Tim X @ 2008-10-22 0:25 ` Xavier Maillard [not found] ` <mailman.1753.1224635369.25473.help-gnu-emacs@gnu.org> 1 sibling, 0 replies; 10+ messages in thread From: Xavier Maillard @ 2008-10-22 0:25 UTC (permalink / raw) To: Tim X; +Cc: help-gnu-emacs Hi, > 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". 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. I second that. This is the best tool to start with when learning. I did that way a long time ago. -batch option is, IMO, a bad idea for a beginner since the user has to know what -batch implies internally (what it does, what it can't do, etc.). Regards Xavier -- http://www.gnu.org http://www.april.org http://www.lolica.org ^ permalink raw reply [flat|nested] 10+ messages in thread
[parent not found: <mailman.1753.1224635369.25473.help-gnu-emacs@gnu.org>]
* Re: how to learn lisp [not found] ` <mailman.1753.1224635369.25473.help-gnu-emacs@gnu.org> @ 2008-10-22 2:12 ` TheFlyingDutchman 2008-10-22 5:59 ` Kevin Rodgers 0 siblings, 1 reply; 10+ messages in thread From: TheFlyingDutchman @ 2008-10-22 2:12 UTC (permalink / raw) To: help-gnu-emacs > -batch option is, IMO, a bad idea for a beginner since the user > has to know what -batch implies internally (what it does, what > it can't do, etc.). > I found out after some head scratching, that the .emacs init file is not read when in batch mode. What are some of the other things to be aware of in batch mode? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-22 2:12 ` TheFlyingDutchman @ 2008-10-22 5:59 ` Kevin Rodgers 0 siblings, 0 replies; 10+ messages in thread From: Kevin Rodgers @ 2008-10-22 5:59 UTC (permalink / raw) To: help-gnu-emacs TheFlyingDutchman wrote: > >> -batch option is, IMO, a bad idea for a beginner since the user >> has to know what -batch implies internally (what it does, what >> it can't do, etc.). >> > I found out after some head scratching, that the .emacs init file is > not read when in batch mode. What are some of the other things to be > aware of in batch mode? RTFM: `-batch' `--batch' Run Emacs in "batch mode". Batch mode is used for running programs written in Emacs Lisp from shell scripts, makefiles, and so on. You should also use the `-l', `-f' or `--eval' option, to invoke a Lisp program to do batch processing. In batch mode, Emacs does not display the text being edited, and the standard terminal interrupt characters such as `C-z' and `C-c' continue to have their normal effect. The functions `prin1', `princ' and `print' output to `stdout' instead of the echo area, while `message' and error messages output to `stderr'. Functions that would normally read from the minibuffer take their input from `stdin' instead. `--batch' implies `-q' (do not load an init file), but `site-start.el' is loaded nonetheless. It also causes Emacs to exit after processing all the command options. In addition, it disables auto-saving except in buffers for which it has been explicitly requested. -- Kevin Rodgers Denver, Colorado, USA ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-21 5:36 ` TheFlyingDutchman 2008-10-21 6:57 ` Tim X @ 2008-10-22 7:37 ` Xah 2008-10-22 11:29 ` Javier 1 sibling, 1 reply; 10+ messages in thread From: Xah @ 2008-10-22 7:37 UTC (permalink / raw) To: help-gnu-emacs On Oct 20, 10:36 pm, TheFlyingDutchman <zzbba...@aol.com> wrote: > 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. i actually don't find batch mode useful for elisp dev. Some other suggested the interactive command line mode (Alt+x ielm), but i don't find it useful neither. I actually never used them for learning elisp or elisp dev. I find that, having elisp code in a buffer, and the ability to evaluate any code in the buffer, in whole or in parts i choose, and being able to interactively exam variables and values, is more helpful. I both learned elisp and do elisp dev this way. I use batch mode when i want to run a already written elisp script for text processing. The ielm i never used. Note: the batch mode is the basic style of running programs supported by almost all langs. The interactive input/output is supported by Python, Common Lisp, many Scheme Lisp, etc langs. Typically functional langs. The eval any parts in buffer is often called notebook, and is the typical way of running programs in MATLAB, mathCAD, Mathematica ... Xah ∑ http://xahlee.org/ ☄ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how to learn lisp 2008-10-22 7:37 ` Xah @ 2008-10-22 11:29 ` Javier 0 siblings, 0 replies; 10+ messages in thread From: Javier @ 2008-10-22 11:29 UTC (permalink / raw) To: help-gnu-emacs Xah, when are you going to start advocating Common Lisp? Come on, you are being the last one, do not stay behind! ;-) ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-10-22 11:29 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-10-13 4:34 how to learn lisp jacklisp 2008-10-13 8:01 ` Jordan Greenberg 2008-10-13 13:52 ` William Case 2008-10-21 5:36 ` TheFlyingDutchman 2008-10-21 6:57 ` Tim X 2008-10-22 0:25 ` Xavier Maillard [not found] ` <mailman.1753.1224635369.25473.help-gnu-emacs@gnu.org> 2008-10-22 2:12 ` TheFlyingDutchman 2008-10-22 5:59 ` Kevin Rodgers 2008-10-22 7:37 ` Xah 2008-10-22 11:29 ` Javier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).