From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky 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: Tue, 28 Nov 2017 19:50:28 -0500 Message-ID: <87fu8xnc17.fsf@users.sourceforge.net> References: <83shdjn3ju.fsf@gnu.org> <83mv3rn02t.fsf@gnu.org> <20171114205449.GA8025@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1511916674 6384 195.159.176.226 (29 Nov 2017 00:51:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 29 Nov 2017 00:51:14 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 29272@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Nov 29 01:51:09 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 1eJqai-000196-U3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 29 Nov 2017 01:51:09 +0100 Original-Received: from localhost ([::1]:40730 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJqao-0000wI-JP for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Nov 2017 19:51:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eJqah-0000w1-WE for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 19:51:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eJqac-0001zX-Vy for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 19:51:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54901) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eJqac-0001zM-Rg for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 19:51:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eJqac-0001sl-Hi for bug-gnu-emacs@gnu.org; Tue, 28 Nov 2017 19:51:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 29 Nov 2017 00:51:02 +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.15119166387204 (code B ref 29272); Wed, 29 Nov 2017 00:51:02 +0000 Original-Received: (at 29272) by debbugs.gnu.org; 29 Nov 2017 00:50:38 +0000 Original-Received: from localhost ([127.0.0.1]:35349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJqaE-0001s7-3q for submit@debbugs.gnu.org; Tue, 28 Nov 2017 19:50:38 -0500 Original-Received: from mail-it0-f49.google.com ([209.85.214.49]:33921) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eJqaC-0001ru-BX for 29272@debbugs.gnu.org; Tue, 28 Nov 2017 19:50:36 -0500 Original-Received: by mail-it0-f49.google.com with SMTP id m11so24764487iti.1 for <29272@debbugs.gnu.org>; Tue, 28 Nov 2017 16:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=XrEyLdwAXNof1/bYARxh4GWASIfNcnrCWDatTw/TeUw=; b=GvJ3NZihLzMUDL8+E7M7RgSjo9TaLfm71M2ktvCzLRyQ+BHVbfsi8Vv+mOXxE7EfZc kwtDjwqy0kaJtprdQftKu+drRg5RDz/0sRsLIifb6rEMVowqoDy1BgDjDFM5wupv+Df9 l5aYbZIIfxQTz+jUabxKI/IdMDscDsZWCRX9KuZcY6gaMtrHZWZFJIkzF+x71CZ+MKWf DWAS+igL/VAPe3ividdslIWkpH//rFwPfRWYtE0L+To5O6HpKHAxWdmMT/nlr3JQYUdg ph5gzeXaTFoyAlmvY/OtAZ7+rTNPotx2NjPPZxHq5SA1zYqxD9ZyK8vT1VU6wzJ7jxp5 IGXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=XrEyLdwAXNof1/bYARxh4GWASIfNcnrCWDatTw/TeUw=; b=gy6G08tn8K/7DuBz1sHBMjh37wDEkfCiMPiFCEfaPtWlwamKq2eHZatEe/j6bv9fQ3 qCfDKfHWvjCx0SgFm9rV+PAT620MtlI435Zy9fC39YIoJKY/TqMpXosYG2/osQBye5RM ZmVpDBuo43jvAYwICPRt4bJ+s3QpprMyR7U6cioJaofbk5+ELqZs2xTkyiAjcv1t71B4 67NkaJ5iHo7Tju1GIEvSN4VyXVcr/07rOe0UK3twJ8a0mAuFERAA6W/oxRmTkVPYEe4V IPHs8TBDvh7/PjwLDtWukCyNY/8veMCHzqwKgJPlcUArLfMbARRkPwplEVazwlIH1hU7 d4xA== X-Gm-Message-State: AJaThX4zqfc2A7w+48kVtKAIyCd+MCgtUClitxhSWST6RMdWLWV/c3j9 +D/MZXNnTJ+YQZqcyJ3GbR205w== X-Google-Smtp-Source: AGs4zMYGwDYeuEbI3gNXloHqvuMQGt527AzSaKV4PPLaq98kYqST7qvDfzP8otV1Y2g2k8wIiTWjPQ== X-Received: by 10.36.108.83 with SMTP id w80mr5100777itb.3.1511916630535; Tue, 28 Nov 2017 16:50:30 -0800 (PST) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p134sm232929iop.75.2017.11.28.16.50.29 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Nov 2017 16:50:29 -0800 (PST) In-Reply-To: <20171114205449.GA8025@ACM> (Alan Mackenzie's message of "Tue, 14 Nov 2017 20:54:49 +0000") 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:140515 Archived-At: Alan Mackenzie writes: > The following patch attempts to catch and filter out obtrusive events. > Could you try it out, please, even though it's not perfect (see below). > It's based on the emacs-26 branch: > > > > diff --git a/lisp/help.el b/lisp/help.el > index fbb9fc8cbe..d119615180 100644 > --- a/lisp/help.el > +++ b/lisp/help.el > @@ -728,11 +728,17 @@ help-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))))))) > + (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.001) > + (while (read-event nil nil 0.001)) > + (not (sit-for (/ double-click-time 1000.0) t)))))))) I've tested this after it was applied to emacs-26 [1: 22ff46e6d8]; the bug is fixed in --with-x-toolkit=gtk build and w32 builds, but not in a --with-x-toolkit=lucid build. [1: 22ff46e6d8]: 2017-11-27 19:28:28 -0500 ; Fix some comment typos https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=22ff46e6d85e3f023eb84ef7e8fe3de8947caf81