From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier 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, 23 Dec 2017 23:55:52 -0500 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1514091254 18071 195.159.176.226 (24 Dec 2017 04:54:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 24 Dec 2017 04:54:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 29478@debbugs.gnu.org, npostavs@users.sourceforge.net To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 24 05:54:10 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 1eSyIb-00048y-Lw for geb-bug-gnu-emacs@m.gmane.org; Sun, 24 Dec 2017 05:54:09 +0100 Original-Received: from localhost ([::1]:57235 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSyKY-0007EK-EP for geb-bug-gnu-emacs@m.gmane.org; Sat, 23 Dec 2017 23:56:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eSyKR-0007E2-F0 for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 23:56:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eSyKQ-0005Tr-L6 for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 23:56:03 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:41141) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eSyKQ-0005Th-GS for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 23:56:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eSyKQ-0007oc-2s for bug-gnu-emacs@gnu.org; Sat, 23 Dec 2017 23:56:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 24 Dec 2017 04:56: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.151409135730030 (code B ref 29478); Sun, 24 Dec 2017 04:56:02 +0000 Original-Received: (at 29478) by debbugs.gnu.org; 24 Dec 2017 04:55:57 +0000 Original-Received: from localhost ([127.0.0.1]:49822 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSyKL-0007oH-1k for submit@debbugs.gnu.org; Sat, 23 Dec 2017 23:55:57 -0500 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:40690) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eSyKI-0007o8-K0 for 29478@debbugs.gnu.org; Sat, 23 Dec 2017 23:55:55 -0500 Original-Received: from ceviche.home (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.7/8.14.1) with ESMTP id vBO4tq9a014682; Sat, 23 Dec 2017 23:55:53 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3FE73662FC; Sat, 23 Dec 2017 23:55:52 -0500 (EST) In-Reply-To: <20171223210407.GC6618@ACM> (Alan Mackenzie's message of "Sat, 23 Dec 2017 21:04:07 +0000") X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 2 Rules triggered EDT_SA_DN_PASS=0, RV6186=0 X-NAI-Spam-Version: 2.3.0.9418 : core <6186> : inlines <6281> : streams <1774005> : uri <2556408> 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:141439 Archived-At: > Out of all these key sequences, some code somewhere has to select the > one for which the help message will be displayed. I think this is a mistake. We should give the answer for all the events we've seen. E.g. it may be important for the user to know that mouse-1 is not bound or that down-mouse-1 is not bound. >> 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). Ah, good, I thought the author had bumped into some odd problem with the other constructs. >> > (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. But how can we know that we'll only drop help-echo events there? > I know of nobody who can press mouse buttons as fast as 100 times a > second. Yeah, I guess in practice it's not too bad (it can still suffer in cases where the events don't come from separate user motions but via input devices which send combined sequences, but it's not too common). But why not just go around the loop again, and skip the help-echo events like we do for mouse-movement? Hmm... oh I guess it's because the read-key-sequence used here has a timeout whereas the other doesn't... I'm beginning to understand. Thanks, Stefan