From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#21747: 25.0.50; while-no-input breaks kbd event handling when called from post-command-hook Date: Sat, 24 Oct 2015 12:14:40 +0300 Message-ID: <83ziz8wrun.fsf@gnu.org> References: <87bnboemqb.fsf@gnu.org> <838u6sy9s1.fsf@gnu.org> <877fmcejgn.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1445678122 30530 80.91.229.3 (24 Oct 2015 09:15:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 09:15:22 +0000 (UTC) Cc: 21747@debbugs.gnu.org To: Tassilo Horn , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 24 11:15:11 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zpuus-0003n0-Dd for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Oct 2015 11:15:10 +0200 Original-Received: from localhost ([::1]:43556 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpuur-0007C0-Nv for geb-bug-gnu-emacs@m.gmane.org; Sat, 24 Oct 2015 05:15:09 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:52084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpuuo-0007Bp-4C for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2015 05:15:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zpuuk-0000u5-SP for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2015 05:15:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:44864) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpuuk-0000tw-Pa for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2015 05:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Zpuuk-00085I-6S for bug-gnu-emacs@gnu.org; Sat, 24 Oct 2015 05:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Oct 2015 09:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21747 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 21747-submit@debbugs.gnu.org id=B21747.144567810031054 (code B ref 21747); Sat, 24 Oct 2015 09:15:02 +0000 Original-Received: (at 21747) by debbugs.gnu.org; 24 Oct 2015 09:15:00 +0000 Original-Received: from localhost ([127.0.0.1]:35572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zpuuh-00084n-U3 for submit@debbugs.gnu.org; Sat, 24 Oct 2015 05:15:00 -0400 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:35546) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZpuuN-00084M-4w for 21747@debbugs.gnu.org; Sat, 24 Oct 2015 05:14:58 -0400 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NWP00400W6Y8F00@mtaout29.012.net.il> for 21747@debbugs.gnu.org; Sat, 24 Oct 2015 12:13:59 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.94.185.246]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NWP00LM4WB8HG70@mtaout29.012.net.il>; Sat, 24 Oct 2015 12:13:57 +0300 (IDT) In-reply-to: <877fmcejgn.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:107973 Archived-At: > From: Tassilo Horn > Cc: 21747@debbugs.gnu.org > Date: Sat, 24 Oct 2015 10:53:12 +0200 > > > Given that, maybe I'm missing something, but what did you expect? The > > above literally says that Emacs shall loop indefinitely after > > performing each command until there's more input. And that's what you > > get. Right? > > Correct, but when the input eventually arrives, I expect to see its > effects as if it had arrived outside of the `while-no-input'. That effect was not yet produced, because the arriving input was not yet consumed by the time while-no-input returns, that input is still "pending". For it to be consumed and acted upon, you need another crank of the Emacs main loop and another redisplay cycle (which is again delayed by the while-no-input loop). So the one-character delay goes on forever. > So the question is: should `while-no-input' call (sit-for 0) as the > first statement in the `progn' or should functions using > `while-no-input' do that on their own? I'd prefer the former because > the current behavior is not really obvious (at least not to me nor > Artur). I don't have enough experience in using while-no-input to answer that. Perhaps others could chime in and voice their opinions. Maybe we should have a discussion on emacs-devel about this (because many people who read emacs-devel don't read the bug list).