help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sleep-for does not work as expected - or perhaps my expection is inc


From: Perry Smith
Subject: Re: sleep-for does not work as expected - or perhaps my expection is incorrect
Date: Tue, 12 Jul 2011 13:55:56 -0500

On Jul 12, 2011, at 12:24 PM, Deniz Dogan wrote:

> On 2011-07-12 16:42, C K Kashyap wrote:
>> (defun somefun ()
>>   (insert "Hello ")
>>   (sleep-for 1)
>> (insert "world\n"))
> 
> The docstring for `sleep-for' says: "Pause, without updating display, for 
> SECONDS seconds."
> 
> Throw a (redisplay t) after the first insertion and it should work.

I'm use to 'sit-for' ... i.e.

(defun somefun ()
  (insert "Hello ")
  (sit-for 1)
(insert "world\n"))

With that you see the Hello... one second pause, then world.

HTH,
pedz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]