2

I would like to repeat actions (preferably as a keyboard macro, but I am open to other solutions), in some kind of automated, "slow motion". By "slow motion", I mean at a speed that is close to human pace, rather than usual full speed of C-x e.

The goal is to be able to prepare actions then play them again during a presentation, or in order to capture them in a screencast (a bit like the GIF at the top of http://developer.atlassian.com/blog/2015/11/scripting-with-node/, or the videos in http://emacsgifs.github.io/).

There are of course a lot of information about automating tasks, and creating macros in Emacs, but nothing about slowing their repetition.

Florent Georges
  • 203
  • 1
  • 7
  • See elisp manual node on [Waiting for Elapsed Time or Input](https://www.gnu.org/software/emacs/manual/html_node/elisp/Waiting.html). – Dan Mar 02 '17 at 16:34
  • Thank you. But as far as I understand, this is for "pausing" for some time, and has to be called explicitly. I was hoping for something a bit more automated, and to give the impression that a human is actually typing (when typing text). – Florent Georges Mar 02 '17 at 16:36
  • 2
    Why not capture them first and then slow down the replay by editing the resulting recording (animated GIF or whatever)? I don't think Emacs offers much help for this, but it should be possible to edit the result outside of Emacs. – Drew Mar 02 '17 at 17:32
  • You shouldn't slow down your typing as much as the parts where you need to give explanations. Probably a tricky problem as is. – YoungFrog Mar 03 '17 at 07:51
  • @Drew Well, I think this is about being able to write it once then repeat it as it changes. – Florent Georges Mar 04 '17 at 01:47
  • @YoungFrog This is to create an animated GIF, so it is quite short, and we need to get time to see what's written down. – Florent Georges Mar 04 '17 at 01:48

1 Answers1

4

Actually, I've just discovered the tag screencast (I added it to my question as well), which contained 2 questions:

Even though package-demo is quite simple, it is enough for my simple needs, and combining them together allows to develop the screencast incrementally and repeat the recording. Here is a simple example how to mix them both:

(package-demo--run-demo
 '((M-x eshell)
   (M-x camcorder-record)
   (pause 1)
   (typewriter "ls -aol")
   (pause 1)
   (kbd "RET")))

This file contains more notes and examples. The result is there or live on http://mlproj.org/ homepage.

Florent Georges
  • 203
  • 1
  • 7
  • There also [gif-screencast](https://gitlab.com/ambrevar/emacs-gif-screencast). And for editing the gif afterwards I recommend GIMP, which lets you adjust the delays between frames. – clemera Dec 09 '18 at 19:32