emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 10 Dec 2015 21:55:28 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: David Kastrup <address@hidden>
>> Cc: address@hidden,  address@hidden,  address@hidden
>> Date: Thu, 10 Dec 2015 21:09:59 +0100
>> 
>>     C-n runs the command next-line (found in global-map), which is an
>>     interactive compiled Lisp function in ‘simple.el’.
>> 
>>     This function is for interactive use only;
>>     in Lisp code use ‘forward-line’ instead.
>> 
>> There is a reason this function is for interactive use only.  And
>> replaying a keyboard macro is not interactive.
>> 
>>     If the variable ‘line-move-visual’ is non-nil, this command moves
>>     by display lines.  Otherwise, it moves by buffer lines, without
>>     taking variable-width characters or continued lines into account.
>> 
>> And this is _exactly_ why line-move-visual should be nil during macro
>> recording/replay because otherwise _no_ _useful_ behavior for
>> non-interactive use results.
>
> But then recording a macro and replaying it will do different things,
> no?

As I apparently did not state clearly enough, one would switch off
visual line mode during recording already (after all, during recording
one tries to achieve the effect that replay should have).

Yes, this will means that the same key sequence outside of macro
recording/replay and inside of it will have different effects.

I readily agree that this is ugly, and if you want to, even "wrong".
The alternative is "useless".  Which serves no point.

-- 
David Kastrup



reply via email to

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