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

closed as too broad by Drew, Stefan, JeanPierre, DoMiNeLa10 Aug 12 at 16:37

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    For that use, recording programming videos, do you really need the typing to be async? I'd just use sit-for and make it synchronous. This is the approach in the built-in animate library (try M-x animate-birthday-present), for example. It's also the approach in Andrea Rossetti's teletype library which you might even be able to use as is. – Omar Aug 11 at 14:26
  • 1
    The question is too broad, and so risks being deleted. Instead of asking for general help designing and implementing what you want, please ask specific questions that invite specific answers. In this case, for example, maybe show (code for) what you tried using 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. – Drew Aug 12 at 0:24
  • 1
    You say "I have tried using timers ..." but you don't say what was not working with them. – Stefan Aug 12 at 8:58

Browse other questions tagged or ask your own question.