[Top][All Lists]

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

Re: Speed of keyboard macro execution?

From: David Kastrup
Subject: Re: Speed of keyboard macro execution?
Date: Fri, 11 Dec 2015 00:35:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

John Wiegley <address@hidden> writes:

>>>>>> David Kastrup <address@hidden> writes:
>> So you don't have an example where having macros recorded/replayed using
>> visual movements would be useful, but you would not want it different on
>> principle.
> I still don't see this as significant enough even to warrant a
> customization variable. Is there a clear example of why a change
> should be made? So far all I've heard are arguments about what seems
> "right" to one person.

    C-x e runs the command kmacro-end-and-call-macro (found in
    global-map), which is an interactive autoloaded compiled Lisp function
    in ‘kmacro.el’.

    It is bound to C-x e.

    (kmacro-end-and-call-macro ARG &optional NO-REPEAT)

    Call last keyboard macro, ending it first if currently being defined.
    With numeric prefix ARG, repeat macro that many times.
    Zero argument means repeat until there is an error.

Repeating a keyboard macro without intervening other actions means that
the macro, after achieving its changes, has to progress to the next
position where executing it makes sense as its last part.  This progress
will often involve moving to the next line.  The next _visual_ line is
meaningless for that purpose in almost all situations.  Under manual
control, you'll just move across some continuation line.  But a repeated
keyboard macro is not under manual control.

My claim is not about "right" but "useful" behavior.  We've had one
other person state that he switches off visual-line-mode always since
keyboard macros would otherwise be useless.  Of course that's one
possibility, but visual-line-mode is actually useful for _visual_
navigation.  Which is not what happens during macro execution since the
computer executes the recorded keys without human intervention.  Which
makes sense in _similar_ but not identical situations (for identical
situations, one could just copy and paste the result repeatedly).  And
non-identical situations will sometimes have lines wrapped visually and
sometimes not without that being related to the structure of the
modified text.

I am surprised that I should be the only user of keyboard macros having
noticed that.

David Kastrup

reply via email to

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