sleep in emacs lisp <h2>script A</h2> <pre><code> (insert (current-time-string)) (sleep-for 5) (insert (current-time-string)) </code></pre> <p><code>M-x eval-buffer</code>, two time strings are inserted with 5 secs apart</p> <h2>script B</h2> <p>some comint code (that add hook, and start process)</p> <pre><code> (sleep-for 60) ;delay a bit for process to finish (insert "ZZZ") </code></pre> <p><code>M-x eval-buffer</code>, "ZZZ" is inserted right away, without any time delay</p> <p>what might have happened? btw, it's Emacs 23.2 on Win XP</p>