Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 22 / 39c8c1186675ca1f7ea5aa89f67d1114b59d88
1 Return-Path: <too@guru-group.fi>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id B3697431E62\r
6         for <notmuch@notmuchmail.org>; Fri,  3 Aug 2012 05:15:58 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id X6Boq9Wku4NS for <notmuch@notmuchmail.org>;\r
16         Fri,  3 Aug 2012 05:15:56 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 60666431FAE\r
19         for <notmuch@notmuchmail.org>; Fri,  3 Aug 2012 05:15:56 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 49A35100372; Fri,  3 Aug 2012 15:16:05 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH] test: test-lib.el: replace sleep-for with sit-for in\r
25         notmuch-test-wait\r
26 Date: Fri,  3 Aug 2012 15:16:03 +0300\r
27 Message-Id: <1343996163-26720-1-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.1\r
29 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
30 X-BeenThere: notmuch@notmuchmail.org\r
31 X-Mailman-Version: 2.1.13\r
32 Precedence: list\r
33 List-Id: "Use and development of the notmuch mail system."\r
34         <notmuch.notmuchmail.org>\r
35 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
36         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
37 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
38 List-Post: <mailto:notmuch@notmuchmail.org>\r
39 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
40 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
42 X-List-Received-Date: Fri, 03 Aug 2012 12:15:58 -0000\r
43 \r
44 The function `notmuch-test-wait` called `get-buffer-process` and\r
45 `sleep-for` in a loop. On some emacses neither of these cause emacs\r
46 to check whether the process has exited and update it's status\r
47 accordingly. In this case the loop does not exit.\r
48 \r
49 The function `sit-for` goes into event loop via `read-event` function\r
50 call. `read-event` does not return when process exits but the event\r
51 loop used to determine whether there is keyboard, mouse, etc. event\r
52 updates the process status as a side effect of the (more generic)\r
53 event loop. `sit-for` is used here to restore the event into queue\r
54 in the improbable case `read-event` consumes an event.\r
55 ---\r
56  test/test-lib.el |    3 ++-\r
57  1 files changed, 2 insertions(+), 1 deletions(-)\r
58 \r
59 diff --git a/test/test-lib.el b/test/test-lib.el\r
60 index 5dd6271..d14246a 100644\r
61 --- a/test/test-lib.el\r
62 +++ b/test/test-lib.el\r
63 @@ -38,7 +38,8 @@\r
64  (defun notmuch-test-wait ()\r
65    "Wait for process completion."\r
66    (while (get-buffer-process (current-buffer))\r
67 -    (sleep-for 0.1)))\r
68 +    ;; sit-for visits event loop for process exit notification.\r
69 +    (sit-for 0.1)))\r
70  \r
71  (defun test-output (&optional filename)\r
72    "Save current buffer to file FILENAME.  Default FILENAME is OUTPUT."\r
73 -- \r
74 1.7.1\r
75 \r