From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29478: [Patch] bug#29478: 26.0.90; `C-h k' followed by mouse clicks no longer shows down event Date: Sat, 30 Dec 2017 12:51:15 +0200 Message-ID: <83zi60ebfg.fsf@gnu.org> References: <20171128221036.GC14868@ACM> <83o9ni3l3i.fsf@gnu.org> <83bmji2xye.fsf@gnu.org> <83tvwzubez.fsf@gnu.org> <20171222220549.GC8072@ACM> <833741lr0t.fsf@gnu.org> <20171223111726.GA6618@ACM> <20171223210407.GC6618@ACM> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1514631021 2768 195.159.176.226 (30 Dec 2017 10:50:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2017 10:50:21 +0000 (UTC) Cc: 29478@debbugs.gnu.org, monnier@IRO.UMontreal.CA, npostavs@users.sourceforge.net To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 30 11:50:17 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVEiT-000078-5f for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Dec 2017 11:50:13 +0100 Original-Received: from localhost ([::1]:49967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVEkQ-00083H-FF for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Dec 2017 05:52:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46767) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVEkH-000832-Ri for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:52:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVEkE-0002cc-Of for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:52:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48546) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVEkE-0002cR-L5 for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:52:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVEkE-0005hx-Bk for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:52:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Dec 2017 10:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29478 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 29478-submit@debbugs.gnu.org id=B29478.151463110421909 (code B ref 29478); Sat, 30 Dec 2017 10:52:02 +0000 Original-Received: (at 29478) by debbugs.gnu.org; 30 Dec 2017 10:51:44 +0000 Original-Received: from localhost ([127.0.0.1]:57227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVEjw-0005hJ-EE for submit@debbugs.gnu.org; Sat, 30 Dec 2017 05:51:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:55376) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVEju-0005h4-MU for 29478@debbugs.gnu.org; Sat, 30 Dec 2017 05:51:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVEjo-00027T-ID for 29478@debbugs.gnu.org; Sat, 30 Dec 2017 05:51:37 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVEjg-0001zT-Pn; Sat, 30 Dec 2017 05:51:28 -0500 Original-Received: from [176.228.60.248] (port=4703 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eVEjg-0007QY-77; Sat, 30 Dec 2017 05:51:28 -0500 In-reply-to: <20171223210407.GC6618@ACM> (message from Alan Mackenzie on Sat, 23 Dec 2017 21:04:07 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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" Xref: news.gmane.org gmane.emacs.bugs:141612 Archived-At: > Date: Sat, 23 Dec 2017 21:04:07 +0000 > Cc: Eli Zaretskii , 29478@debbugs.gnu.org, > npostavs@users.sourceforge.net > From: Alan Mackenzie > > > I must say after reading the whole thread and looking at the code, > > I still don't really understand what's the idea behind this patch (nor > > exactly which problems we're trying to solve). > > To make C-h c/k display "mouse-appearance-menu" rather > than "key sequence unbound". The idea behind the code is to return the > last key sequence which is bound, rather than the very last one, which > may not be. > > > The way I understand the problem (which may be naive because I haven't > > tried to play with the code yet, so I'm probably missing some subtlety), > > the code should "simply" read events until the event read is not a down > > event (and skipping pseudo events like mouse-movements and help-echo). > > And then return all those events (it's probably not going to be more > > than 2, but I don't see any benefit in hard-coding the fact that we > > return either 1 or 2 events, we could just say "returns a list of > > events"). > > Out of all these key sequences, some code somewhere has to select the > one for which the help message will be displayed. Perhaps arbitrarily, > this is now in help-read-key-sequence. > > > BTW, here are some comments about the current code: > > > > (and no-mouse-movement > > > (string-match "mouse-movement" keyname)) > > > + (progn (push key keys) nil) > > > (and (string-match "\\(mouse\\|down\\|click\\|drag\\)" > > > keyname) > > > Why string-match on event names rather than use things like > > event-basic-type, and event-modifiers? > > Lack of knowledge on the part of the person who wrote it (me). > > > > (progn > > > @@ -739,13 +740,31 @@ help-read-key-sequence > > > (sleep-for 0.01) > > > (while (read-event nil nil 0.01)) > > > We're blindly throwing away events here, right? Isn't that a problem? > > No, it's a filter. Things like , which otherwise triggered > the sit-for are now discarded, so that only user events are processed. > I know of nobody who can press mouse buttons as fast as 100 times a > second. All this was diagnosed in the early stages of another bug > report, bug #29272. Alan, any news on this one? I'm waiting for this to go in before asking Nicolas to produce the next pretest of Emacs 26.1. Thanks.