From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Emanuel Berg <moasen@zoho.com>
Newsgroups: gmane.emacs.help
Subject: Re: strange behaviour in keyboard macro
Date: Mon, 31 Jul 2017 11:19:53 +0200
Message-ID: <86shhdynd2.fsf@zoho.com>
References: <20170730055106.GA2292@ordenador31> <867eyqo06i.fsf@zoho.com>
	<20170730100135.GB2056@ordenador31> <86379e3umd.fsf@zoho.com>
	<877eyp3cf0.fsf@jane> <868tj538ck.fsf@zoho.com> <874ltt2p8w.fsf@jane>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1501492868 25201 195.159.176.226 (31 Jul 2017 09:21:08 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Mon, 31 Jul 2017 09:21:08 +0000 (UTC)
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)
To: help-gnu-emacs@gnu.org
Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 31 11:21:03 2017
Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geh-help-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>)
	id 1dc6sj-00060M-Sh
	for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jul 2017 11:20:58 +0200
Original-Received: from localhost ([::1]:58269 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>)
	id 1dc6sp-00006y-TC
	for geh-help-gnu-emacs@m.gmane.org; Mon, 31 Jul 2017 05:21:03 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60750)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <geh-help-gnu-emacs@m.gmane.org>) id 1dc6s3-0008Ul-0e
	for help-gnu-emacs@gnu.org; Mon, 31 Jul 2017 05:20:16 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <geh-help-gnu-emacs@m.gmane.org>) id 1dc6ry-0000Uv-4D
	for help-gnu-emacs@gnu.org; Mon, 31 Jul 2017 05:20:14 -0400
Original-Received: from [195.159.176.226] (port=43781 helo=blaine.gmane.org)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <geh-help-gnu-emacs@m.gmane.org>)
	id 1dc6rx-0000Sm-Uy
	for help-gnu-emacs@gnu.org; Mon, 31 Jul 2017 05:20:10 -0400
Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2)
	(envelope-from <geh-help-gnu-emacs@m.gmane.org>) id 1dc6rn-00031N-2P
	for help-gnu-emacs@gnu.org; Mon, 31 Jul 2017 11:19:59 +0200
X-Injected-Via-Gmane: http://gmane.org/
Mail-Followup-To: help-gnu-emacs@gnu.org
Original-Lines: 55
Original-X-Complaints-To: usenet@blaine.gmane.org
Mail-Copies-To: never
Cancel-Lock: sha1:D2nq1xRk3D7N/aB3TD95AgtbhrY=
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
	[fuzzy]
X-Received-From: 195.159.176.226
X-BeenThere: help-gnu-emacs@gnu.org
X-Mailman-Version: 2.1.21
Precedence: list
List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/help-gnu-emacs/>
List-Post: <mailto:help-gnu-emacs@gnu.org>
List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>,
	<mailto:help-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "help-gnu-emacs"
	<help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.help:113918
Archived-At: <http://permalink.gmane.org/gmane.emacs.help/113918>

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