GNU bug report logs - #14810
24.3.50; bothersome case where `input-pending' returns t but should return nil

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: minor; Reported by: Drew Adams <drew.adams@HIDDEN>; dated Sun, 7 Jul 2013 03:11:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 7 Jul 2013 03:10:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Jul 06 23:10:51 2013
Received: from localhost ([127.0.0.1]:35923 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1UvfND-0002Ll-At
	for submit <at> debbugs.gnu.org; Sat, 06 Jul 2013 23:10:51 -0400
Received: from eggs.gnu.org ([208.118.235.92]:52504)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <drew.adams@HIDDEN>) id 1UvfNA-0002LL-Aa
 for submit <at> debbugs.gnu.org; Sat, 06 Jul 2013 23:10:49 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1UvfN3-0008OC-NP
 for submit <at> debbugs.gnu.org; Sat, 06 Jul 2013 23:10:43 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-99.2 required=5.0 tests=BAYES_50,USER_IN_WHITELIST
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:57106)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1UvfN3-0008O8-JJ
 for submit <at> debbugs.gnu.org; Sat, 06 Jul 2013 23:10:41 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:54209)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1UvfN0-0000Lt-UW
 for bug-gnu-emacs@HIDDEN; Sat, 06 Jul 2013 23:10:41 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1UvfMz-0008Mn-GT
 for bug-gnu-emacs@HIDDEN; Sat, 06 Jul 2013 23:10:38 -0400
Received: from userp1040.oracle.com ([156.151.31.81]:31594)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <drew.adams@HIDDEN>) id 1UvfMz-0008Md-1S
 for bug-gnu-emacs@HIDDEN; Sat, 06 Jul 2013 23:10:37 -0400
Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237])
 by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id
 r673AZAJ009495
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
 for <bug-gnu-emacs@HIDDEN>; Sun, 7 Jul 2013 03:10:36 GMT
Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231])
 by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r673AYc1003516
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Sun, 7 Jul 2013 03:10:35 GMT
Received: from abhmt106.oracle.com (abhmt106.oracle.com [141.146.116.58])
 by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r673AYA2003730
 for <bug-gnu-emacs@HIDDEN>; Sun, 7 Jul 2013 03:10:34 GMT
MIME-Version: 1.0
Message-ID: <bd05b8ef-bb3e-4e7d-81f0-e811824da324@default>
Date: Sat, 6 Jul 2013 20:10:31 -0700 (PDT)
From: Drew Adams <drew.adams@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 24.3.50; bothersome case where `input-pending' returns t but should
 return nil
X-Priority: 3
X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7  (607090) [OL
 12.0.6668.5000 (x86)]
Content-Type: multipart/mixed;
 boundary="__1373166634162430154abhmt106.oracle.com"
X-Source-IP: acsinet21.oracle.com [141.146.126.237]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.0 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.0 (----)

--__1373166634162430154abhmt106.oracle.com
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

Not sure what the best Subject line is for this bug.

I'm having some trouble with `minibuffer-message' in the context of a
standalone minibuffer frame.  Messages that should appear and remain
displayed for the full `minibuffer-message-timeout' period (2 sec)
are shown and then immediately erased.

emacs -Q

Load the attached file.

The code for `min-msg' is a stripped-down version of the code for
`minibuffer-message'.  The code for `my-sit-for' is essentially the code
for `sit-for'.

M-x <pause> <pause> <pause>...

That is, hit the Pause key multiple times, waiting 2 sec or more between
each key press.

You _should_ see an alternating message each time <pause> is pressed:

-------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-------------------
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

etc.

Each message _should_ remain displayed for 2 sec, unless you hit another
key (or use the mouse etc.).  Instead, each message appears and then is
erased so quickly that it is hard to even notice that it was displayed.

If you remove the (redisplay 'FORCE) from the code then you will not
even see the messages at all.

If you replace the call to `my-sit-for' by the commented lines following
it (in `min-msg') then you can see that the `sit-for' never returns
non-nil (except the first time).

Or if you uncomment the commented lines in `my-sit-for' you will see that
`input-pending-p' always returns t.

I am even interested in knowing a workaround.  And in understanding the
problem better.

At one point I thought the problem might have to do with `sit-for'
receiving a `switch-frame' event from `select-frame-set-focus' and
(mistakenly) handling it like user input, but this does not seem to be
the case.

If you uncomment the commented lines in `my-sit-for' you will see that
the event that causes the `input-pending' to return t is apparently
`pause', i.e., hitting the Pause key.

That seems wrong to me (a bug?).  If you wait more than 2 sec before
hitting <pause> then I do not see how `sit-for' can see the `pause'
event.  Unless perhaps there is some additional `sit-for' somewhere
(not in the attached code).

I do understand that `input-pending' does not _guarantee_ to return
nil when there is no pending input.  But I would like some way to
control the behavior in this scenario.=20

Thx.



In GNU Emacs 24.3.50.1 (i686-pc-mingw32)
 of 2013-07-01 on LEG570
Bzr revision: 113246 lekktu@HIDDEN
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=3D/c/usr --enable-checking CFLAGS=3D'-O0 -g3'
 CPPFLAGS=3D'-DGLYPH_DEBUG=3D1 -I/c/usr/include''

--__1373166634162430154abhmt106.oracle.com
Content-Type: application/octet-stream; name="throw-bug-sit-for.el"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="throw-bug-sit-for.el"

KGRlZnVuIGZvbyAoKQ0KICAoaW50ZXJhY3RpdmUpDQogIChjb25kICgoZXEgKHNlbGVjdGVkLXdp
bmRvdykgKGFjdGl2ZS1taW5pYnV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S1wdXQgb2wgJ2FmdGVyLXN0cmlu
ZyBtZXNzYWdlKQ0KICAgICAgICAgICAgICAgICAgICAocmVkaXNwbGF5ICdGT1JDRSkNCiAgICAg
ICAgICAgICAgICAgICAgKG15LXNpdC1mb3IgKG9yIG1pbmlidWZmZXItbWVzc2FnZS10aW1lb3V0
IDEwMDAwMDApKQ0KICAgICAgICAgICAgICAgICAgICA7OyAod2hlbiAobXktc2l0LWZvciAob3Ig
bWluaWJ1ZmZlci1tZXNzYWdlLXRpbWVvdXQgMTAwMDAwMCkpDQogICAgICAgICAgICAgICAgICAg
IDs7ICAobWVzc2FnZSAiKysrKysrKysrKysrKysrKysiKShzbGVlcC1mb3IgMikpDQogICAgICAg
ICAgICAgICAgICAgICkNCiAgICAgICAgICAoZGVsZXRlLW92ZXJsYXkgb2wpKSkpKSkNCg0KKGRl
ZnVuIG15LXNpdC1mb3IgKHNlY29uZHMgJm9wdGlvbmFsIG5vZGlzcCBvYnNvbGV0ZSkNCiAgKGlm
IChudW1iZXJwIG5vZGlzcCkNCiAgICAgIChzZXRxIHNlY29uZHMgKCsgc2Vjb25kcyAoKiAxZS0z
IG5vZGlzcCkpDQogICAgICAgICAgICBub2Rpc3Agb2Jzb2xldGUpDQogICAgKGlmIG9ic29sZXRl
IChzZXRxIG5vZGlzcCBvYnNvbGV0ZSkpKQ0KICAoY29uZA0KICAgKG5vbmludGVyYWN0aXZlDQog
ICAgKHNsZWVwLWZvciBzZWNvbmRzKQ0KICAgIHQpDQogICAoKGFuZCAoaW5wdXQtcGVuZGluZy1w
KQ0KICAgICAgICAgOzsgKHByb2duIChtZXNzYWdlICJldmVudDogJVMiIGxhc3QtaW5wdXQtZXZl
bnQpIChzbGVlcC1mb3IgMSkNCiAgICAgICAgIDs7ICAgICAgICB0DQogICAgICAgICApDQogICAg
bmlsKQ0KICAgKCg8PSBzZWNvbmRzIDApDQogICAgKG9yIG5vZGlzcCAocmVkaXNwbGF5KSkpDQog
ICAodA0KICAgIChvciBub2Rpc3AgKHJlZGlzcGxheSkpDQogICAgKGxldCAoKHJlYWQgKHJlYWQt
ZXZlbnQgbmlsIG5pbCBzZWNvbmRzKSkpDQogICAgICAob3IgKG51bGwgcmVhZCkNCiAgICAgICAg
ICAocHJvZ24NCiAgICAgICAgICAgIChpZiAoZXEgb3ZlcnJpZGluZy10ZXJtaW5hbC1sb2NhbC1t
YXAgdW5pdmVyc2FsLWFyZ3VtZW50LW1hcCkNCiAgICAgICAgICAgICAgICAoc2V0cSByZWFkIChj
b25zIHQgcmVhZCkpKQ0KICAgICAgICAgICAgKHB1c2ggcmVhZCB1bnJlYWQtY29tbWFuZC1ldmVu
dHMpDQogICAgICAgICAgICBuaWwpKSkpKSkNCg0KKHNldHEgbWluaWJ1ZmZlci1mcmFtZS1hbGlz
dCAnKChtaW5pYnVmZmVyIC4gb25seSkpKQ0KKHNldHEgZGVmYXVsdC1taW5pYnVmZmVyLWZyYW1l
ICAobWFrZS1mcmFtZSBtaW5pYnVmZmVyLWZyYW1lLWFsaXN0KSkNCihzZXRxIGRlZmF1bHQtZnJh
bWUtYWxpc3QgJygobWluaWJ1ZmZlcikpKQ0KDQo=
--__1373166634162430154abhmt106.oracle.com--




Acknowledgement sent to Drew Adams <drew.adams@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#14810; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.