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

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

Re: Emacs Book Vs Emacs Manuals


From: Filipp Gunbin
Subject: Re: Emacs Book Vs Emacs Manuals
Date: Tue, 30 Jun 2015 19:56:30 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

On 30/06/2015 01:51 +0200, Emanuel Berg wrote:

> Filipp Gunbin <fgunbin@fastmail.fm> writes:
>
>> Macros can be viewed as an Emacs-specific way of
>> writing programs - by using the benefits of an
>> interactive editor.
>
> Macros are even in the *name* of Emacs so they would
> seem essential. That christening was a long time ago,
> of course.
>
> There are macros in many other tools. Perhaps they are
> not editable. Probably the whole thing is not as
> refined as in Emacs.
>
>> Resulting code is not that editable, but in my
>> practice I didn't usually have to edit that code,
>> when it's easier just to re-record a similar macros,
>> if needed.
>
> So you don't write code - you write macros to write
> the code for you. Now we have ventured far beyond my
> horizon. It would be interesting to see you in action.

No no, you misunderstood or I wasn't clear enough.  It's simpler.  A
macro is a program, too, and it's editable as you know, but written in a
different language.

When I record a macro I get some code in the end, yet it's not elisp.

That's what I meant by saying that macros help write code _using
interactive editor facilities_ - that is, not directly typing language
syntactic constructs.  It's quicker and simpler to record a macro, but
the cost of it is the lack of general usefulness.

This is obvious, and I'm writing it because you time after time refuse
to admit that sometimes macros are better than elisp.  I suppose you
have reasons to say that, that's why this discussion can be interesting
to me.

>>> When you have done something with Elisp, you can
>>> save that for future use. What it is is clearly
>>> defined and easy to read and edit. Not only that,
>>> if it is modular, as it should, you can use it for
>>> other, unexpected things in the future.
>>
>> Why then use awk when you always can write
>> equivalent program in C?
>
> Answer: because awk is
...

Yes, thanks, that was a rhetorical question :-)

Meant to underline that programs written in a language not general
enough to handle all and everything also can be useful sometimes, and
awk is a good example, I think.

Filipp



reply via email to

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