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

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

Re: strange behaviour in keyboard macro


From: Emanuel Berg
Subject: Re: strange behaviour in keyboard macro
Date: Mon, 31 Jul 2017 11:19:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Marcin Borkowski wrote:

> A typical use case: I need to fix/edit/add
> something in a configuration file, using the
> format VARIABLE=value, for 4-5 variables with
> similar names (like PREFIX_SOMETHING=value,
> where value is somehow based on SOMETHING).
> I record a keybord macro, press F4 3-4 times,
> bam, done, in 10 seconds. (Recently,
> I started to use multiple cursors for that
> kind of stuff, too, but keyboard macros are
> a tad more powerful, I guess.)

4-5 variables?! :O

I think I'd do *40-50* with typing only before
I even considered anything else. And it takes
less time than drinking a 33 cl 2.8% beer.
Ba ba ba ba ba ba ba. Done.

For configuration files absolutely unnecessary
both keyboard macros and Elisp. Perhaps for
huge batch data files, but then I'd use some
shell processing tool to clean that up, rather.

Here, I say "Elisp" as in Elisp to do the
specific case. But Santa has a few helpers that
works in general, and can be applied to many
situations, e.g.:

    http://user.it.uu.se/~embe8573/emacs-init/align.el

>> Learn to type really, really fast. Use Elisp
>> whenever it isn't fast enough. Speed kills.
>
> Typing fast would be fine, but keyboard
> macros don't make mistakes.

They do which is one of their problems.
Doing Elisp also has errors (bugs) but 1) they
are much easier to fix, and 2) the solution is
transferable and transformable. Keyboard macros
are poor-man's programming by definition.

Will be inferior, always. And they don't lead
anywhere. Elisp on the contrary leads to more
Elisp, to the destruction of many young men's
careers and so on. But what do you need
a career for when you have Elisp?

TEHO, of course.

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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