From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Markus Triska Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2930: 23.0.92; `accept-process-output' and `sleep-for' do not run sentinels Date: Wed, 08 Apr 2009 20:30:25 +0200 Message-ID: Reply-To: Markus Triska , 2930@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1239216726 20102 80.91.229.12 (8 Apr 2009 18:52:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Apr 2009 18:52:06 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 08 20:53:24 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lrctd-0007FA-Tf for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 20:53:14 +0200 Original-Received: from localhost ([127.0.0.1]:42957 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LrcsF-0005V6-FY for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Apr 2009 14:51:47 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lrckf-0002h6-TI for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:43:57 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lrckb-0002fF-6J for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:43:57 -0400 Original-Received: from [199.232.76.173] (port=42864 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lrcka-0002ew-S4 for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:43:52 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:51505) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LrckZ-0005UE-AL for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2009 14:43:51 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n38IhmbJ028029; Wed, 8 Apr 2009 11:43:49 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n38Ie5xt026764; Wed, 8 Apr 2009 11:40:05 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Markus Triska Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Wed, 08 Apr 2009 18:40:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2930 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123921543724498 (code B ref -1); Wed, 08 Apr 2009 18:40:05 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 8 Apr 2009 18:30:37 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n38IUXMg024480 for ; Wed, 8 Apr 2009 11:30:34 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:48147 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LrcXg-0006SS-QN for emacs-pretest-bug@gnu.org; Wed, 08 Apr 2009 14:30:33 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LrcXc-0003Ul-Ja for emacs-pretest-bug@gnu.org; Wed, 08 Apr 2009 14:30:32 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:36916) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1LrcXc-0003U9-0o for emacs-pretest-bug@gnu.org; Wed, 08 Apr 2009 14:30:28 -0400 Original-Received: (qmail invoked by alias); 08 Apr 2009 18:30:25 -0000 Original-Received: from chello062178240212.3.14.tuwien.teleweb.at (EHLO mt-imac.local) [62.178.240.212] by mail.gmx.net (mp034) with SMTP; 08 Apr 2009 20:30:25 +0200 X-Authenticated: #4064391 X-Provags-ID: V01U2FsdGVkX18wUx1K1KIwdzsCLv5nTBYvo330o3+QSNUgkgpyzJ iTfYLiHnF/g6ci Original-Received: by mt-imac.local (Postfix, from userid 501) id 1F0582B0532; Wed, 8 Apr 2009 20:30:25 +0200 (CEST) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.51 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Wed, 08 Apr 2009 14:43:57 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:27010 gmane.emacs.pretest.bugs:24249 Archived-At: The documentation for sentinels states: A program can wait, so that sentinels will run, by calling `sit-for' or `sleep-for' (...), or `accept-process-output' (...). However, when I do M-x eval-region RET on the following forms in "emacs -Q", then Emacs loops unexpectedly: (defun my-sentinel (proc str) (setq my-finished t)) (let ((p (start-process "bc" nil "bc")) my-finished) (set-process-sentinel p 'my-sentinel) (process-send-string p "quit\n") (while (not my-finished) (accept-process-output nil 0.1))) When I replace the call of `accept-process-output' with (sleep-for 0.1), it also does not run the sentinel. (sit-for 0.1) works as documented, but is not a good alternative for the other functions in this case: If keyboard input is available, `sit-for' returns immediately, so it is currently unfortunately also necessary to discard keyboard input to make such a loop reliably run the sentinel. In GNU Emacs 23.0.92.2 (i386-apple-darwin9.6.1, GTK+ Version 2.14.7) of 2009-04-05 on mt-imac.local Windowing system distributor `The X.Org Foundation', version 11.0.10402000 configured using `configure '--with-tiff=no'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t