From ff02fbd86b0849d1e91ff66e2c5d418e18eba7f1 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Tue, 14 Aug 2012 11:16:13 +2000 Subject: [PATCH] Re: [PATCH 2/2] test: emacs: run list-processes after accept-process-output in emacs 23.1 --- 4a/20faa28547d5f76de40bf4f6217c07bbe4b3dd | 124 ++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 4a/20faa28547d5f76de40bf4f6217c07bbe4b3dd diff --git a/4a/20faa28547d5f76de40bf4f6217c07bbe4b3dd b/4a/20faa28547d5f76de40bf4f6217c07bbe4b3dd new file mode 100644 index 000000000..a78a223cb --- /dev/null +++ b/4a/20faa28547d5f76de40bf4f6217c07bbe4b3dd @@ -0,0 +1,124 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id E7526431FB6 + for ; Mon, 13 Aug 2012 08:16:17 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 8deIaSaNQN0q for ; + Mon, 13 Aug 2012 08:16:17 -0700 (PDT) +Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU + [18.7.68.34]) + by olra.theworths.org (Postfix) with ESMTP id 63048431FAE + for ; Mon, 13 Aug 2012 08:16:17 -0700 (PDT) +X-AuditID: 12074422-b7f1f6d00000090b-a0-50291a408d66 +Received: from mailhub-auth-4.mit.edu ( [18.7.62.39]) + by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP + id 05.02.02315.04A19205; Mon, 13 Aug 2012 11:16:16 -0400 (EDT) +Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) + by mailhub-auth-4.mit.edu (8.13.8/8.9.2) with ESMTP id q7DFGFj6002248; + Mon, 13 Aug 2012 11:16:16 -0400 +Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) + (authenticated bits=0) + (User authenticated as amdragon@ATHENA.MIT.EDU) + by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q7DFGD5Q007553 + (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); + Mon, 13 Aug 2012 11:16:14 -0400 (EDT) +Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) + (envelope-from ) + id 1T0wNJ-0001FB-No; Mon, 13 Aug 2012 11:16:13 -0400 +Date: Mon, 13 Aug 2012 11:16:13 -0400 +From: Austin Clements +To: Tomi Ollila +Subject: Re: [PATCH 2/2] test: emacs: run list-processes after + accept-process-output in emacs 23.1 +Message-ID: <20120813151613.GN11179@mit.edu> +References: <1344165182-29246-1-git-send-email-tomi.ollila@iki.fi> + <1344165182-29246-2-git-send-email-tomi.ollila@iki.fi> +MIME-Version: 1.0 +Content-Type: text/plain; charset=us-ascii +Content-Disposition: inline +In-Reply-To: <1344165182-29246-2-git-send-email-tomi.ollila@iki.fi> +User-Agent: Mutt/1.5.21 (2010-09-15) +X-Brightmail-Tracker: + H4sIAAAAAAAAA+NgFmpgleLIzCtJLcpLzFFi42IRYrdT13WQ0gwwmLzPxOL6zZnMFm9WzmN1 + YPI4/HUhi8ezVbeYA5iiuGxSUnMyy1KL9O0SuDLOfJ/BWPCHt6LvQyNTA+MC7i5GDg4JAROJ + 97Pcuhg5gUwxiQv31rOB2EIC+xglpu4N6WLkArI3MEpc/P2GGcI5ySTxsrGNEcJZwijxevsq + FpBJLAKqEt2fk0C62QQ0JLbtX84IYosIqEg8aFvPCmIzC0hLfPvdzARiCwukSPS3z2AFaeUV + 0JHY878WYnG1xOmnB5lBbF4BQYmTM5+wQLRqSdz495IJpBxkzPJ/HCBhTgFnic87m8GmiwJt + mnJyG9sERqFZSLpnIemehdC9gJF5FaNsSm6Vbm5iZk5xarJucXJiXl5qka6pXm5miV5qSukm + RnBAuyjtYPx5UOkQowAHoxIP7yU7jQAh1sSy4srcQ4ySHExKorxcEpoBQnxJ+SmVGYnFGfFF + pTmpxYcYJTiYlUR4JU4BlfOmJFZWpRblw6SkOViUxHmvpdz0FxJITyxJzU5NLUgtgsnKcHAo + SfC+kgQaKliUmp5akZaZU4KQZuLgBBnOAzT8NUgNb3FBYm5xZjpE/hSjopQ4722QhABIIqM0 + D64XlnBeMYoDvSLM2wFSxQNMVnDdr4AGMwEN/s6hBjK4JBEhJdXAGPz5y6/LBk6iM8T6NZbN + tHb/bG8qq3Gh/7ROpcpct6w3B29m3DKLF8p16LluyzVn1dTm6/565X8mvIv52mdht2hzr7Ja + SmjAnx7Fp9vC4sLsvk65r7h7r1jkNEPJnWmGJ4yX+e9fUsh07rt+52uRLXOM2JacFe5mWvV4 + 01vTSwKTV0ZPswtxUmIpzkg01GIuKk4EAJzuXHMTAwAA +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Mon, 13 Aug 2012 15:16:18 -0000 + +Quoth Tomi Ollila on Aug 05 at 2:13 pm: +> When running emacs tests using emacs 23.1.1 the tests block (until timeout) +> when emacs function (notmuch-test-wait) is called. +> +> There is an emacs bug #2930 titled: +> 23.0.92; `accept-process-output' and `sleep-for' do not run sentinel +> +> It seems this is present in emacs 23.1. +> +> Calling list-processes after accept-process-output seems work around +> this problem; in case Emacs version is 23.1 a defadvice is activated +> to do just that. + +Should this workaround perhaps go in notmuch-test-wait directly, +instead of being implemented as advice? If we do want to keep it as +advice, should it go in notmuch-lib.el along with the few other +compatibility functions? + +> --- +> +> Thanks to Austin for the comments and IRC discussions on the matter. +> +> test/test-lib.el | 8 ++++++++ +> 1 files changed, 8 insertions(+), 0 deletions(-) +> +> diff --git a/test/test-lib.el b/test/test-lib.el +> index 52d9936..4330352 100644 +> --- a/test/test-lib.el +> +++ b/test/test-lib.el +> @@ -35,6 +35,16 @@ +> "Disable yes-or-no-p before executing kill-emacs" +> (defun yes-or-no-p (prompt) t))) +> +> +;; Emacs bug #2930: +> +;; 23.0.92; `accept-process-output' and `sleep-for' do not run sentinels +> +;; seems to be present in Emacs 23.1. +> +;; Running `list-processes' after `accept-process-output' seems to work +> +;; around this problem. +> +(if (and (= emacs-major-version 23) (= emacs-minor-version 1)) +> + (defadvice accept-process-output (after run-list-processes activate) +> + "run list-processes after executing accept-process-output" +> + (list-processes))) +> + +> (defun notmuch-test-wait () +> "Wait for process completion." +> (while (get-buffer-process (current-buffer)) -- 2.26.2