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

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

Re: learning Emacs Lisp


From: Richard Riley
Subject: Re: learning Emacs Lisp
Date: Tue, 11 Nov 2008 11:34:50 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Lennart Borgman" <lennart.borgman@gmail.com> writes:

> On Tue, Nov 11, 2008 at 9:48 AM, Richard Riley <rileyrgdev@gmail.com> wrote:
>>> That darn old emacs again ! Seriously this has more to do with lisp in
>>> general than specifically with elisp. I doubt you'd find any _one_ serious
>>> programmer or author in the whole lisp community who proposes this kind of
>>> style ( each closing paren on a seperate line ).
>>
>> You will notice that I did not propose it. I said the standard is hard
>> for me to read as someone who is not an eLisp magician. I still do not
>> understand (other than the reasons I postulated about above) why it is
>> as it is. I find it very hard to indent and match (ok, emacs helps with
>> matching brackets), but would find it very difficult to read from a
>> printout for example. But this is more my lack of experience
>> possibly. All hindrances can become less so with experience. But would
>> aligned brackets really hurt anyone? I dont think so. It is convention
>> (and convention is a good thing at times) which has the style as it
>> is. Or?
>
> I think that most elisp programmers will look at the indentation when
> reading the code on paper. You can compare with python where only the
> indentation matters. I do not like that, but the combination of
> indentation (for the eyes) and parenthesis (for the parser) seems very
> good to me.
>

While I am not surprised at some of the reactions to my recommendations
for Xah Lee's tutorial, I feel I should defend it further from the
perspective of the programmer coming to eLisp for the first time. I know
for me going to php, , java, bash script and elisp  (as some examples),
I knew what I wanted to do. It was a question of how.

I wanted to

+ display some stuff in the result are/log/status buffer
+ compare some values using standard operators
+ loop on things
+ define variables with varying scope
+ manipulate and merge some strings
+ create and use a function or two
+ handle arrays/lists of data and manipulate them

If the following does not make that clear to a programmer then I think
nothing will:

http://xahlee.org/emacs/elisp_basics.html

>From that quick intro I could get into other people's code and read it a
lot more comfortably. It reminds me very much of K&R's excellent
tutorial section at the beginning of the C Programming language in that
its written for the programmer who knows what he wants to do, just not
in that particular language at that moment in time. I recommend it
completely.


reply via email to

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