[Top][All Lists]

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

Re: dabbrev-expand should escape kbd macros, shouldn't it?

From: Daniel Colascione
Subject: Re: dabbrev-expand should escape kbd macros, shouldn't it?
Date: Wed, 17 Jul 2019 11:30:54 -0700
User-agent: SquirrelMail/1.4.23 [SVN]

> On Jul 17 2019, "Daniel Colascione" <address@hidden> wrote:
>> Right now, if you record a kbd macro and hit M-/, the act of hitting M-/
>> is recorded like any other command in the kbd macro. On replay, we'll
>> run
>> dabbrev-expand. The problem is that dabbrev-expand produces radically
>> different results depending on buffer context, making macro replay
>> unpredictable. Should the *result* of dabbrev-expand just get put into
>> the
>> kbd macro instead?
> How is that different from any other key that is part of the macro?  The
> point of a kbd macro is to record keys, not their effect (or even their
> binding).

Sort of. We make keyboard macros in the first place so we can do a thing
over and over. It turns out that dumbly recording and replaying keystrokes
is a pretty good strategy for lightweight automation. But dumb key
recording doesn't work well in some cases, and dabbrev is one of those. I
use dabbrev because I want to insert a specific string, cycling through
alternatives until I find the one I want. That's going to produce
different results on different occasions. Most of the time, recorded
keystrokes in macros aren't that sensitive to _temporal_ and _interbuffer_
context, and dabbrev is, so I think we should make an exception for

reply via email to

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