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: Wed, 29 Nov 2017 19:53:57 +0200 Message-ID: <83bmjl3r9m.fsf@gnu.org> References: <83shdjn3ju.fsf@gnu.org> <83mv3rn02t.fsf@gnu.org> <20171114205449.GA8025@ACM> <87fu8xnc17.fsf@users.sourceforge.net> <83h8td4uw5.fsf@gnu.org> <5A1E724A.5030507@gmx.at> <87wp29jk7t.fsf@users.sourceforge.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1511978124 29935 195.159.176.226 (29 Nov 2017 17:55:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2017 17:55:24 +0000 (UTC) Cc: 29272@debbugs.gnu.org, acm@muc.de To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 29 18:55:18 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 1eK6Zk-0006pC-QC for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Nov 2017 18:55:13 +0100 Original-Received: from localhost ([::1]:44453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK6Zn-0001M9-L4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Nov 2017 12:55:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33559) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK6Ze-0001Jw-Sa for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 12:55:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eK6Zb-0005n5-QA for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 12:55:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56803) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eK6Zb-0005my-Lz for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 12:55:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eK6Za-0008OY-1X for bug-gnu-emacs@gnu.org; Wed, 29 Nov 2017 12:55:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Nov 2017 17:55: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: confirmed Original-Received: via spool by 29272-submit@debbugs.gnu.org id=B29272.151197806432217 (code B ref 29272); Wed, 29 Nov 2017 17:55:01 +0000 Original-Received: (at 29272) by debbugs.gnu.org; 29 Nov 2017 17:54:24 +0000 Original-Received: from localhost ([127.0.0.1]:37251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK6Yy-0008NZ-FV for submit@debbugs.gnu.org; Wed, 29 Nov 2017 12:54:24 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:42179) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eK6Yw-0008NK-Ju for 29272@debbugs.gnu.org; Wed, 29 Nov 2017 12:54:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eK6Ym-0004U6-IF for 29272@debbugs.gnu.org; Wed, 29 Nov 2017 12:54:17 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43978) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eK6Ym-0004Tu-Eb; Wed, 29 Nov 2017 12:54:12 -0500 Original-Received: from [176.228.60.248] (port=3998 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eK6Yk-00023n-W2; Wed, 29 Nov 2017 12:54:12 -0500 In-reply-to: <87wp29jk7t.fsf@users.sourceforge.net> (message from Noam Postavsky on Wed, 29 Nov 2017 08:19:34 -0500) 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:140545 Archived-At: > From: Noam Postavsky > Cc: Eli Zaretskii , acm@muc.de, 29272@debbugs.gnu.org > Date: Wed, 29 Nov 2017 08:19:34 -0500 > > > The following works for me in lucid and gtk: > > --- c/lisp/help.el > +++ i/lisp/help.el > @@ -726,19 +726,19 @@ 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))) > - (or > - (and no-mouse-movement > - (string-match "mouse-movement" keyname)) > - (and (string-match "\\(mouse\\|down\\|click\\|drag\\)" > - keyname) > - (progn > - ;; Discard events (e.g. ) which might > - ;; spuriously trigger the `sit-for'. > - (sleep-for 0.01) > - (while (read-event nil nil 0.01)) > - (not (sit-for (/ double-click-time 1000.0) t)))))))) > + (`[(,key0 . ,_)] > + (or (and no-mouse-movement (eq key0 'mouse-movement)) > + ;; Wait long enough to fully read a double click event. > + ;; FIXME: How to handle double-click-time = t? > + (and (numberp double-click-time) > + (string-match "\\(mouse\\|down\\|click\\|drag\\)" > + (symbol-name key0)) > + (progn > + ;; Discard events (e.g. ) which might > + ;; spuriously trigger the `sit-for'. > + (sleep-for 0.01) > + (while (read-event nil nil 0.01)) > + (not (sit-for (/ double-click-time 1000.0) t)))))))) > (list > key > ;; If KEY is a down-event, read and include the > LGTM, thanks > > BTW: Could someone please fix that > > > > (not (sit-for (/ double-click-time 1000.0) t)) > > > > form so it handles at least those values of `double-click-time' > > described in its documentation: > > > > Maximum time between mouse clicks to make a double-click. > > Measured in milliseconds. The value nil means disable double-click > > recognition; t means double-clicks have no time limit and are detected > > by position only. > > > > I'm not sure what `sit-for' is supposed to return in those cases. > > I don't know how to handle the double-click-time = t case though. I think we should use some fixed time in that case.