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

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

Re: line-move-visual


From: Stefan Monnier
Subject: Re: line-move-visual
Date: Wed, 08 Dec 2010 15:11:43 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> IMO, that should be done automatically.  But others argue, that a
> keyboard macro should act exactly as doing the same stuff manually. Then

There's a tension here, indeed: OT1H keyboard macros only record
a sequence of keys, so they should really be equivalent to having the
user hit the same keys in the same order, but OTOH they correspond to
mechanical execution, i.e. to code, so they need simple&reliable
semantics in order to work well.

As Emacs commands tend to get more complex over time (more DWIMish,
usually), we have more cases of commands that should really only ever be
used interactively because they require the user to see the result
before making the next step.

This tension for keyboard macros is made evident if you ever try to turn
a keyboard macro into a piece of Elisp code.  A job which would seem
simple enough that a little Elisp package could do it for you, right?

I would encourage people to try and write up a new keyboard-macro
package which would be closer to writing Elisp code: instead of
recording keys, it would record commands, and would do so in a submode
where DWIMish things (line-move-visual, abbrev-mode, auto-fill-mode,
... you name it) are disabled.


        Stefan


reply via email to

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