5

Recording a GIF screencast of Emacs details a few ways we can record screencasts of Emacs sessions (e.g. to demonstrate features), but I'm really bad at not screwing things up :-)

Is there a way to script a session such that I can fake proficiency with my own package? Essentially such a thing would be a keyboard macro, but it would not run at superhuman speeds and would be writable as a true script.

Ideally, the interface would be something like

(emacs-session-script
  "M-x"
  (insert "magit-status")
  "RET"
  (pause 1)
  "@"
  (pause 1)
  "i"
  (pause 1)
  "=l"
  (pause 0.5)
  (insert "Here is some text inserted into ")
  (insert "the minibuffer with a typewriter-like effect")
  (pause 1)
  "RET"
  ; Now emacs has switched to a new buffer
  ; (insert :speed is now 10 characters/second here)
  (insert :speed 10 "Here is a long piece of text

with many lines")
  (pause 1)
  "C-c C-c"
  (pause 2))
Sean Allred
  • 6,861
  • 16
  • 85

2 Answers2

2

It's still in infancy, but package-demo has basic ability to do this.

Sean Allred
  • 6,861
  • 16
  • 85
1

I asked on #emacs on Freenode IRC and the instant answer was demo-it, it's been used for presentations to move from slide to slide and to open source code and then to run commands on the terminal, all within emacs.

I've personally used demo-it with some custom extensions to automatically insert whole blocks of code into a source code file and recorded that as a screencast.

It solves this problem:

During my sprint reviews, I noticed I used my org-mode-formatted files, eshell and source code buffers… always in Emacs. However, fat-fingering or mentally burping delayed the gratification for my audience while I laboriously typed. I solved this problem by predefining each “step” as an Emacs Lisp function, and had another function execute each step function when I hit an advance key (F12).