I am trying to build a function, that takes a body of text from a buffer or a file, and "simulates typing" in another buffer. This will serve me towards recording programming videos where the code appears to be written in real-time.
The main issue I am dealing with is the delay which needs to happen between each character printed. I have tried using timers such as run-at-time
and async-start
with sleep-for
events.
run-at-time
is printing every character from the string after the chosen delay, despite being inside a dolist
.
I am quite a noob on Elisp, maybe someone could give me a hand? I am using Spacemacs. If someone is wondering, the effect that I want to achieve would be something similar of the youtuber Biskwit, but much simpler of course. Here
sit-for
and make it synchronous. This is the approach in the built-inanimate
library (tryM-x animate-birthday-present
), for example. It's also the approach in Andrea Rossetti'steletype
library which you might even be able to use as is.run-at-time
etc., and point to a specific (code) problem you ran into. Post separate questions for separate, specific problems or questions you have.