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 9D21D431FAF
\r
6 for <notmuch@notmuchmail.org>; Sun, 5 Aug 2012 04:12:55 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\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 ENIGpsRNgdra for <notmuch@notmuchmail.org>;
\r
16 Sun, 5 Aug 2012 04:12: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 25F34431FAE
\r
19 for <notmuch@notmuchmail.org>; Sun, 5 Aug 2012 04:12:55 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 7ACFF100387; Sun, 5 Aug 2012 14:13:05 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: notmuch@notmuchmail.org
\r
24 Subject: [PATCH 2/2] test: emacs: run list-processes after
\r
25 accept-process-output in emacs 23.1
\r
26 Date: Sun, 5 Aug 2012 14:13:02 +0300
\r
27 Message-Id: <1344165182-29246-2-git-send-email-tomi.ollila@iki.fi>
\r
28 X-Mailer: git-send-email 1.7.1
\r
29 In-Reply-To: <1344165182-29246-1-git-send-email-tomi.ollila@iki.fi>
\r
30 References: <1344165182-29246-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
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: Sun, 05 Aug 2012 11:12:55 -0000
\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
49 There is an emacs bug #2930 titled:
\r
50 23.0.92; `accept-process-output' and `sleep-for' do not run sentinel
\r
52 It seems this is present in emacs 23.1.
\r
54 Calling list-processes after accept-process-output seems work around
\r
55 this problem; in case Emacs version is 23.1 a defadvice is activated
\r
59 Thanks to Austin for the comments and IRC discussions on the matter.
\r
61 test/test-lib.el | 8 ++++++++
\r
62 1 files changed, 8 insertions(+), 0 deletions(-)
\r
64 diff --git a/test/test-lib.el b/test/test-lib.el
\r
65 index 52d9936..4330352 100644
\r
66 --- a/test/test-lib.el
\r
67 +++ b/test/test-lib.el
\r
69 "Disable yes-or-no-p before executing kill-emacs"
\r
70 (defun yes-or-no-p (prompt) t)))
\r
72 +;; Emacs bug #2930:
\r
73 +;; 23.0.92; `accept-process-output' and `sleep-for' do not run sentinels
\r
74 +;; seems to be present in Emacs 23.1.
\r
75 +;; Running `list-processes' after `accept-process-output' seems to work
\r
76 +;; around this problem.
\r
77 +(if (and (= emacs-major-version 23) (= emacs-minor-version 1))
\r
78 + (defadvice accept-process-output (after run-list-processes activate)
\r
79 + "run list-processes after executing accept-process-output"
\r
80 + (list-processes)))
\r
82 (defun notmuch-test-wait ()
\r
83 "Wait for process completion."
\r
84 (while (get-buffer-process (current-buffer))
\r