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

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

Re: print out all members of a list, v.1.0


From: Tim X
Subject: Re: print out all members of a list, v.1.0
Date: Tue, 01 Mar 2011 08:32:20 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

ken <gebser@mousecar.com> writes:

> Ughhh.  Finally, after reading many, many info pages and running a dozen
> or so google searches and reading four or five that many web pages over
> the past couple days, I found what I was after... mapconcat.  Still then
> it took a bit of reading error messages and playing around with syntax,
> but it's working.  All that for one line of code!
>
> I've programmed in a lot of languages over the decades, but elisp
> definitely has the steepest learning curve... prolly cuz it's so
> hodge-podgey.  Well, this isn't a discussion I have time for.  I'm just
> sayin', if not for emacs, elisp would be gone... and it might be gone
> anyway in a generation or two.  I'll leave it to those who know the
> language better than I to if/how to prevent that happening.
>
>
Hi Ken,

Elisp is what actually differentiates Emacs from other editors. 

if you have programming experience, but finding elisp difficult due to
syntax and a feeling it is very "hodge-podge", I would strongly
recommend you read the "Introduction to Emacs Lisp" which is bundled
with emacs (from version 23 onwards) or from the gnu website. 

The document states it is targeted at non-programmers, which may put you
off. However, elisp (and lisp in general) has some conceptual
differences that can make it harder than necessary if you are use to
other more procedural languages like C or one of the scripting
languages. Some of the terminology will seem very alien (i.e. car, cdr
etc) but are in fact quite simple conceptually. Understanding the REPL
is important. 

One reason I think you may find this useful is that a common property of
lisp languages is a very small, simple and consistent syntax. As you
have found this a problem, I'm guessing you may be missing some basic
grass root concepts underlying how it works. Once you have these
concepts and adjust to the slightly different lisp development model
(i.e. using the repl to experiment and build up small bits of code),
there is a good chance you will feel very comfortable with the language
and will frequently find yourself knocking up small elisp functions to
automate tasks. 

Once your comfortable with the langauge, the biggest challenge you will
face is just knowing what funnctions already exist. This is where
getting comfortable with the emacs help, apropos and manual helps. Most
of the time, you can achieve what you want just by glueing together
already existing lower level functions.

HTH

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

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