Message from discussion
Recording a macro that preserves timing
Received: by 10.66.88.42 with SMTP id bd10mr5890355pab.18.1349940060610;
Thu, 11 Oct 2012 00:21:00 -0700 (PDT)
MIME-Version: 1.0
Path: jt13ni2869pbb.1!nntp.google.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!aioe.org!.POSTED!not-for-mail
From: Juha Nieminen <nos...@thanks.invalid>
Newsgroups: gnu.emacs.help
Subject: Recording a macro that preserves timing
Date: Thu, 4 Oct 2012 10:21:32 +0000 (UTC)
Organization: Aioe.org NNTP Server
Lines: 18
Message-ID: <k4jnvc$ah9$1@speranza.aioe.org>
NNTP-Posting-Host: x6oKauqjz/aVLymSbCEcrg.user.speranza.aioe.org
X-Complaints-To: abuse@aioe.org
User-Agent: tin/1.9.6-20100522 ("Lochruan") (UNIX) (Linux/3.1.10-grbfs-kapsi (x86_64))
X-Notice: Filtered by postfilter v. 0.8.2
Bytes: 1612
X-Received-Bytes: 1660
I can record (and then replay) keyboard macros in emacs. However, I would
like a variant that also records the timing between the keypresses so
that when it's played back, it does the exact same thing as when recording,
with the same timing.
Then I would like to be able to play said macro with a speed factor. In
other words, I would like to be able to multiply all the recorded timings
by a value (so that if I multiply them eg. by 0.5 the macro will play at
twice the original speed).
If possible, it would be nice if this macro could be saved to a file
where it could be edited by hand (to eg. add or modify timings). In fact,
it would be really great if it was saved in a format that would allow
defining different factors for different groups of recorded keypresses
(so that by editing the file I could define "this part should be played
back with a factor of 0.5, this part with a factor of 0.2, etc.")
How difficult would such elisp code be to make?