auto-choosing reply addresses in notmuch-emacs
[notmuch-archives.git] / 08 / 9aa5f2e4bb794df98bf62f77b2c72b8bf0c1d7
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 1E984431FAF\r
6         for <notmuch@notmuchmail.org>; Sat,  4 Aug 2012 16:16:56 -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 rIUbfq9C3DbU for <notmuch@notmuchmail.org>;\r
16         Sat,  4 Aug 2012 16:16:55 -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 55541431FAE\r
19         for <notmuch@notmuchmail.org>; Sat,  4 Aug 2012 16:16:55 -0700 (PDT)\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)\r
21         id 41D8F100372; Sun,  5 Aug 2012 02:17:04 +0300 (EEST)\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>\r
23 To: notmuch@notmuchmail.org\r
24 Subject: [PATCH v2] test: test-lib.el: replace sleep-for with sit-for in\r
25         notmuch-test-wait\r
26 Date: Sun,  5 Aug 2012 02:17:02 +0300\r
27 Message-Id: <1344122222-14344-1-git-send-email-tomi.ollila@iki.fi>\r
28 X-Mailer: git-send-email 1.7.1\r
29 In-Reply-To: <1343996163-26720-1-git-send-email-tomi.ollila@iki.fi>\r
30 References: <1343996163-26720-1-git-send-email-tomi.ollila@iki.fi>\r
31 Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
32 X-BeenThere: notmuch@notmuchmail.org\r
33 X-Mailman-Version: 2.1.13\r
34 Precedence: list\r
35 List-Id: "Use and development of the notmuch mail system."\r
36         <notmuch.notmuchmail.org>\r
37 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
38         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
39 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
40 List-Post: <mailto:notmuch@notmuchmail.org>\r
41 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
42 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
43         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
44 X-List-Received-Date: Sat, 04 Aug 2012 23:16:56 -0000\r
45 \r
46 When running emacs tests using emacs 23.1.1 the tests block (until timeout)\r
47 when emacs function (notmuch-test-wait) is called.\r
48 \r
49 There is an emacs bug #2930 titled:\r
50 23.0.92; `accept-process-output' and `sleep-for' do not run sentinels\r
51 \r
52 It seems this is still active in emacs 23.1; replacing sleep-for with\r
53 sit-for makes the tests work as expected.\r
54 \r
55 The other function in loop executed in notmuch-test-wait: get-buffer-process\r
56 just loops through process list, returning matching process object (or nil\r
57 if no such process found) without doing any further processing.\r
58 \r
59 By comparing Emacs 23.1 and 23.2 function wait_reading_process_output ()\r
60 (changes in do_display variable usage) it seems that this bug has been\r
61 fixed in 23.2.\r
62 ---\r
63  test/test-lib.el |    6 +++++-\r
64  1 files changed, 5 insertions(+), 1 deletions(-)\r
65 \r
66 diff --git a/test/test-lib.el b/test/test-lib.el\r
67 index 5dd6271..30d6eb7 100644\r
68 --- a/test/test-lib.el\r
69 +++ b/test/test-lib.el\r
70 @@ -38,7 +38,11 @@\r
71  (defun notmuch-test-wait ()\r
72    "Wait for process completion."\r
73    (while (get-buffer-process (current-buffer))\r
74 -    (sleep-for 0.1)))\r
75 +    ;; It seems in Emacs 23.1 `accept-process-output' and `sleep-for' do not\r
76 +    ;; run sentinels (bug#2930 (bug-gnu-emacs)). `sit-for' works as documented.\r
77 +    ;; `sleep-for` may already work in Emacs 23.2 as function\r
78 +    ;; wait_reading_process_output() in src/process.c has related change.\r
79 +    (sit-for 0.1)))\r
80  \r
81  (defun test-output (&optional filename)\r
82    "Save current buffer to file FILENAME.  Default FILENAME is OUTPUT."\r
83 -- \r
84 1.7.1\r
85 \r