Re: [PATCH 2/2] test: emacs: run list-processes after accept-process-output in emacs...
authorAustin Clements <amdragon@MIT.EDU>
Mon, 13 Aug 2012 15:16:13 +0000 (11:16 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:49:04 +0000 (09:49 -0800)
4a/20faa28547d5f76de40bf4f6217c07bbe4b3dd [new file with mode: 0644]

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