From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#14810: 24.3.50; bothersome case where `input-pending' returns t but should return nil Date: Sat, 6 Jul 2013 20:10:31 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="__1373166634162430154abhmt106.oracle.com" X-Trace: ger.gmane.org 1373166669 31651 80.91.229.3 (7 Jul 2013 03:11:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 7 Jul 2013 03:11:09 +0000 (UTC) To: 14810@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 07 05:11:09 2013 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 1UvfNV-0002xn-0x for geb-bug-gnu-emacs@m.gmane.org; Sun, 07 Jul 2013 05:11:09 +0200 Original-Received: from localhost ([::1]:57785 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfNU-0000NP-BT for geb-bug-gnu-emacs@m.gmane.org; Sat, 06 Jul 2013 23:11:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54358) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfNP-0000N7-Po for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:11:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvfNO-0000Kb-N7 for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:11:03 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:41607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfNO-0000KW-Je for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UvfNO-0002MU-7Y for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 07 Jul 2013 03:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14810 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13731666519042 (code B ref -1); Sun, 07 Jul 2013 03:11:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Jul 2013 03:10:51 +0000 Original-Received: from localhost ([127.0.0.1]:35923 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvfND-0002Ll-At for submit@debbugs.gnu.org; Sat, 06 Jul 2013 23:10:51 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52504) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UvfNA-0002LL-Aa for submit@debbugs.gnu.org; Sat, 06 Jul 2013 23:10:49 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvfN3-0008OC-NP for submit@debbugs.gnu.org; Sat, 06 Jul 2013 23:10:43 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:57106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfN3-0008O8-JJ for submit@debbugs.gnu.org; Sat, 06 Jul 2013 23:10:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54209) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfN0-0000Lt-UW for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:10:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UvfMz-0008Mn-GT for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:10:38 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:31594) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UvfMz-0008Md-1S for bug-gnu-emacs@gnu.org; Sat, 06 Jul 2013 23:10:37 -0400 Original-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 ; Sun, 7 Jul 2013 03:10:36 GMT Original-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 ; Sun, 7 Jul 2013 03:10:35 GMT Original-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 ; Sun, 7 Jul 2013 03:10:34 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.7 (607090) [OL 12.0.6668.5000 (x86)] 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-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: 140.186.70.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:76033 Archived-At: --__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 ... 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 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 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@gmail.com-20130701165437-ea20s94hqwp3ttaj 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 bmRvdykgKGFjdGl2ZS1taW5pYnVmZmVyLXdpbmRvdykpDQogICAgICAgICAoc3dpdGNoLXRvLWJ1 ZmZlci1vdGhlci13aW5kb3cgIipNZXNzYWdlcyoiKQ0KICAgICAgICAgKG1pbi1tc2cgIi0tLS0t LS0tLS0tLS0tLS0tLS0iKSkNCiAgICAgICAgKHQNCiAgICAgICAgIChzZWxlY3QtZnJhbWUtc2V0 LWlucHV0LWZvY3VzICh3aW5kb3ctZnJhbWUgKGFjdGl2ZS1taW5pYnVmZmVyLXdpbmRvdykpKQ0K ICAgICAgICAgKHNlbGVjdC13aW5kb3cgKGFjdGl2ZS1taW5pYnVmZmVyLXdpbmRvdykpDQogICAg ICAgICAobWluLW1zZyAiQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQCIpKSkpDQoN CihnbG9iYWwtc2V0LWtleSAoa2JkICI8cGF1c2U+IikgJ2ZvbykNCg0KKGRlZnVuIG1pbi1tc2cg KG1lc3NhZ2UpDQogIChzYXZlLXNlbGVjdGVkLXdpbmRvdw0KICAgIChzZWxlY3Qtd2luZG93ICht aW5pYnVmZmVyLXdpbmRvdykpDQogICAgKHdpdGgtY3VycmVudC1idWZmZXIgKHdpbmRvdy1idWZm ZXIgKGFjdGl2ZS1taW5pYnVmZmVyLXdpbmRvdykpDQogICAgICAobWVzc2FnZSBuaWwpDQogICAg ICAobGV0ICgob2wgKG1ha2Utb3ZlcmxheSAocG9pbnQtbWF4KSAocG9pbnQtbWF4KSBuaWwgdCB0 KSkNCiAgICAgICAgICAgIChpbmhpYml0LXF1aXQgdCkpDQogICAgICAgICh1bndpbmQtcHJvdGVj dA0KICAgICAgICAgICAgIChwcm9nbiAodW5sZXNzICh6ZXJvcCAobGVuZ3RoIG1lc3NhZ2UpKQ0K ICAgICAgICAgICAgICAgICAgICAgIChwdXQtdGV4dC1wcm9wZXJ0eSAwIDEgJ2N1cnNvciB0IG1l c3NhZ2UpKQ0KICAgICAgICAgICAgICAgICAgICAob3ZlcmxheS1wdXQgb2wgJ2FmdGVyLXN0cmlu 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--