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#29272: 26.0.90; "C-h k C-mouse-3" followed by menu selection asks for more keys Date: Sun, 12 Nov 2017 14:38:50 +0200 Message-ID: <83mv3rn02t.fsf@gnu.org> References: <83shdjn3ju.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1510490416 18422 195.159.176.226 (12 Nov 2017 12:40:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Nov 2017 12:40:16 +0000 (UTC) Cc: 29272@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 12 13:40:11 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 1eDrYY-0004Tt-9V for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Nov 2017 13:40:10 +0100 Original-Received: from localhost ([::1]:48897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDrYd-0004ZN-Ct for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Nov 2017 07:40:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37944) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDrYT-0004YF-6I for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 07:40:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDrYP-0005PF-UQ for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 07:40:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55678) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDrYP-0005Ov-Rx for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 07:40:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eDrYP-0007Qt-II for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 07:40:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2017 12:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29272 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29272-submit@debbugs.gnu.org id=B29272.151049034228483 (code B ref 29272); Sun, 12 Nov 2017 12:40:01 +0000 Original-Received: (at 29272) by debbugs.gnu.org; 12 Nov 2017 12:39:02 +0000 Original-Received: from localhost ([127.0.0.1]:36126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDrXQ-0007PE-Qs for submit@debbugs.gnu.org; Sun, 12 Nov 2017 07:39:02 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:46765) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDrXO-0007P2-IM for 29272@debbugs.gnu.org; Sun, 12 Nov 2017 07:38:58 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDrXE-000523-3z for 29272@debbugs.gnu.org; Sun, 12 Nov 2017 07:38:53 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40605) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDrXE-00051w-0U; Sun, 12 Nov 2017 07:38:48 -0500 Original-Received: from [176.228.60.248] (port=3932 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eDrXC-0004tn-6p; Sun, 12 Nov 2017 07:38:47 -0500 In-reply-to: <83shdjn3ju.fsf@gnu.org> (message from Eli Zaretskii on Sun, 12 Nov 2017 13:23:49 +0200) 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:139801 Archived-At: > Date: Sun, 12 Nov 2017 13:23:49 +0200 > From: Eli Zaretskii > > To reproduce: > > emacs -Q > C-h k C-mouse-3 > > This pops up a Lisp Interaction Mode menu. Select some item from the > menu. The expected result is to show in *Help* the description of the > command selected from the menu. Instead, you are prompted again for a > key or a mouse click. > > "C-h l" shows this: > > C-h k [describe-key] > > > (I'm guessing help-echo comes from the menu items traversed by the > mouse while selecting the item.) I think those help-echo events are the reason. We have this in help-read-key-sequence: (while (pcase (setq key (read-key-sequence "\ Describe the following key, mouse click, or menu item: ")) ((and (pred vectorp) (let `(,key0 . ,_) (aref key 0)) (guard (symbolp key0)) (let keyname (symbol-name key0))) (if no-mouse-movement (string-match "mouse-movement" keyname) (and (string-match "\\(mouse\\|down\\|click\\|drag\\)" keyname) (not (sit-for (/ double-click-time 1000.0) t))))))) What I think happens is that after the mouse-click event we get a help-echo event, which causes sit-for to exit with nil value, and we keep looping, because the loop expects only mouse events. Alan, could you please take a look? I think this was introduced by your changes in 10c0e1c (which you, no doubt, will have hard time recognizing among the code that meanwhile was completely refactored), which I think was an attempt to fix bug#22731 (not mentioned in the log message). I think the changes failed to consider mouse clicks that invoke menu items.