[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: Thu, 10 Dec 2015 21:09:59 +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 20:38:58 +0100
>> >> Tying the operation of keyboard macros to the current display/font
>> >> selection is just meaningless.  Its purpose is for _aiming_ positioning
>> >> by keyboard, and that's just not useful at keyboard replay.
>> >
>> > I think it depends on the keyboard macro.  The ones I saw in that demo
>> > did move point, moreover they moved it to the end of a very long line,
>> > so both the actual redisplay and its simulation were at work,
>> > including auto-hscroll.
>> So how did line-move-visual accomplish anything useful here?
> One example is vertical-motion, and many commands that call it.  E.g.,
> if the macro invokes C-n.


    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.

>> Which occured during keyboard macro execution due to line-move-visual
>> being active.
> No, not necessarily.  Rather, the original issue with keyboard macros
> is just one of the scenarios that brings the broader problem to light,
> if the macro invokes one of the affected commands.

No argument here.  I'm not against fixing the redisplay problem.  I'm
against involving display-based movement in keyboard macros.

>> So I think it would make excellent sense to disable visual
>> positioning modes while recording and replaying keyboard macros.
> No, I think you are wrong.  Think C-n and C-p again.

That's exactly the reason for me wanting to disable visual positioning
modes while recording and replaying keyboard macros.

I mean, obviously I would not proposing it if I thought it should not
make a difference.

So I have no idea what your argument here is supposed to be.

David Kastrup

reply via email to

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