From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie 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 13:24:08 +0000 Message-ID: <20171112132408.GA20916@ACM> References: <83shdjn3ju.fsf@gnu.org> <83mv3rn02t.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1510493176 24660 195.159.176.226 (12 Nov 2017 13:26:16 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Nov 2017 13:26:16 +0000 (UTC) User-Agent: Mutt/1.7.2 (2016-11-26) Cc: 29272@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 12 14:26:12 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 1eDsH2-00064v-Uk for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Nov 2017 14:26:09 +0100 Original-Received: from localhost ([::1]:49243 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDsHA-0004yC-E6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 12 Nov 2017 08:26:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eDsH1-0004y5-Oo for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 08:26:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eDsGw-0007zt-QS for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 08:26:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:55704) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eDsGw-0007zi-MP for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 08:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eDsGv-0008V2-OL for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2017 08:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2017 13:26: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.151049315332657 (code B ref 29272); Sun, 12 Nov 2017 13:26:01 +0000 Original-Received: (at 29272) by debbugs.gnu.org; 12 Nov 2017 13:25:53 +0000 Original-Received: from localhost ([127.0.0.1]:36152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eDsGm-0008Uf-Qs for submit@debbugs.gnu.org; Sun, 12 Nov 2017 08:25:53 -0500 Original-Received: from ocolin.muc.de ([193.149.48.4]:31893 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1eDsGl-0008UW-7i for 29272@debbugs.gnu.org; Sun, 12 Nov 2017 08:25:51 -0500 Original-Received: (qmail 23564 invoked by uid 3782); 12 Nov 2017 13:25:45 -0000 Original-Received: from acm.muc.de (p548C60E3.dip0.t-ipconnect.de [84.140.96.227]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 12 Nov 2017 14:25:44 +0100 Original-Received: (qmail 11995 invoked by uid 1000); 12 Nov 2017 13:24:08 -0000 Content-Disposition: inline In-Reply-To: <83mv3rn02t.fsf@gnu.org> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de 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:139804 Archived-At: Hello, Eli. On Sun, Nov 12, 2017 at 14:38:50 +0200, Eli Zaretskii wrote: > > 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? Will do. > 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. That could well be the case. I'll be looking at it. -- Alan Mackenzie (Nuremberg, Germany).