all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* sleep-for does not work as expected - or perhaps my expection is incorrect
@ 2011-07-12 14:42 C K Kashyap
  2011-07-12 17:24 ` Deniz Dogan
  2011-07-12 17:39 ` PJ Weisberg
  0 siblings, 2 replies; 5+ messages in thread
From: C K Kashyap @ 2011-07-12 14:42 UTC (permalink / raw)
  To: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 391 bytes --]

Hi,
(defun somefun ()
  (insert "Hello ")
  (sleep-for 1)
(insert "world\n"))

When I invoke "somefun" by doign -  M-: (somefun) <return>

I see that "Hello world" gets printed after 1 second instead of printing
Hello and then printing world after one second.

What can I do to get the script to write out "hello" first and then wait for
a second and then write out world?

Regards,
Kashyap

[-- Attachment #2: Type: text/html, Size: 576 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-07-12 18:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-12 14:42 sleep-for does not work as expected - or perhaps my expection is incorrect C K Kashyap
2011-07-12 17:24 ` Deniz Dogan
2011-07-12 18:55   ` Perry Smith
2011-07-12 17:39 ` PJ Weisberg
2011-07-12 17:44   ` suvayu ali

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.