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: Mon, 29 Jun 2015 16:03:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (darwin)

On 27/06/2015 19:42 +0200, Emanuel Berg wrote:

> Rusi <rustompmody@gmail.com> writes:
>
>>> %% (replace-regexp "^\\(.*&.*&\\).*&\\(.*\\)"
>>> "\\1\\2")
>>
>> 51 chars (ignoring that things like ^& are shift
>> chords)
>>
>> F3 C-s & RET C-SPC C-s C-s RET C-w C-a C-n F4
>>
>> 16 keystrokes counting each chord as 1 1/2 keys
>
> Elisp is by definition better because everything you
> can do with keyboard macros, you can do with Elisp -
> but not even remotely so the other way around.

Macros can be viewed as an Emacs-specific way of writing programs - by
using the benefits of an interactive editor.  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.

> 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?

Filipp



reply via email to

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