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

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

bug#27479:


From: npostavs
Subject: bug#27479:
Date: Sun, 25 Jun 2017 07:37:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (gnu/linux)

John Beck <john.morris.beck@gmail.com> writes:

> (progn (insert "side effect 1")
>        (message "side effect 2")
>        (sleep-for 10)
>        (insert "side effect 3"))
>
> AFAIK progn should execute lisp comands sequentially.
>
> However in this instance it does not. First we get the message
> "side effect 2" Then we insert "side effect 1" and "side effect 3"
> at the same time.

Actually they do run sequentially, but the minibuffer text is repainted
directly after the 'message' call, while the buffer text is only
repainted at the end.  Try this:

(progn (insert "side effect 1")
       (message "side effect 2 %s" (buffer-string))
       (sleep-for 10)
       (insert "side effect 3"))

or this:

(progn (insert "side effect 1")
       (redisplay)
       (message "side effect 2")
       (sleep-for 10)
       (insert "side effect 3"))





reply via email to

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