From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#18212: 24.3.92; Left-click on a button is treated as mouse-2 Date: Thu, 07 Aug 2014 14:36:42 -0400 Message-ID: References: <87vbq5nypa.fsf@golux.woodcraft.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1407436656 1582 80.91.229.3 (7 Aug 2014 18:37:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2014 18:37:36 +0000 (UTC) Cc: 18212-done@debbugs.gnu.org To: Matthew Woodcraft Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 20:37:29 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XFSZ1-0005U0-EL for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2014 20:37:23 +0200 Original-Received: from localhost ([::1]:47783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFSZ1-0000Lq-41 for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2014 14:37:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFSYq-0000KM-7T for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 14:37:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFSYh-0002Kf-It for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 14:37:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55539) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFSYh-0002Kb-FW for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 14:37:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XFSYh-0005ZJ-3i for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 14:37:03 -0400 Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Aug 2014 18:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 18212 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 18212@debbugs.gnu.org, monnier@iro.umontreal.ca, matthew@woodcraft.me.uk Original-Received: via spool by 18212-done@debbugs.gnu.org id=D18212.140743661121357 (code D ref 18212); Thu, 07 Aug 2014 18:37:02 +0000 Original-Received: (at 18212-done) by debbugs.gnu.org; 7 Aug 2014 18:36:51 +0000 Original-Received: from localhost ([127.0.0.1]:34247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFSYU-0005YN-EE for submit@debbugs.gnu.org; Thu, 07 Aug 2014 14:36:50 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:47376) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFSYS-0005Y5-3r for 18212-done@debbugs.gnu.org; Thu, 07 Aug 2014 14:36:49 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArYGAIDvNVPAqyKr/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECK9GolMXjnoHhDgEqwODTCGBLAICHA X-IPAS-Result: ArYGAIDvNVPAqyKr/2dsb2JhbABZgwaDSr0vgw6BFxd0giUBAQEBAgFWIwULCzQSFBgNJIgECK9GolMXjnoHhDgEqwODTCGBLAICHA X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="82398862" Original-Received: from 192-171-34-171.cpe.pppoe.ca (HELO pastel.home) ([192.171.34.171]) by ironport2-out.teksavvy.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 07 Aug 2014 14:36:42 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 0F2F960787; Thu, 7 Aug 2014 14:36:42 -0400 (EDT) In-Reply-To: <87vbq5nypa.fsf@golux.woodcraft.me.uk> (Matthew Woodcraft's message of "Wed, 06 Aug 2014 21:35:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:92276 Archived-At: > emacs -Q --exec "(global-set-key (kbd \"\") 'clipboard-yank)" --exec "(info)" > Left-click on one of the hyperlinks. > Emacs says > Buffer is read-only: # > rather than following the hyperlink. BTW, if you middle-click instead of left-click, you also get this error, but you still follow the hyperlink (so you usually only see the error if you go look for it in *Messages*). The fundamental reason for the difference is that mouse-1-click-follows-link defaults to 450, which means that we can't decide whether the down-mouse-1 should be turned into a down-mouse-2 or not until either we see the subsequent mouse-1 or 450ms have passed. In this case, the 450ms typically don't pass, but we had to wait for the mouse-1 to arrive. At that point we turn those two events into down-mouse-2 and mouse-2. So it looks just the same as what happens for a middle-click. The crucial difference is that when the command bound to down-mouse-2 is run, we have already received the mouse-1 (aka mouse-2), and since errors have the side effect of emptying the "not yet processed input", the error on down-mouse-2 ends up canceling the subsequent mouse-1/2. I installed the workaround below, Stefan --- lisp/info.el 2014-03-14 20:51:22 +0000 +++ lisp/info.el 2014-08-07 18:28:18 +0000 @@ -3994,6 +3994,7 @@ (define-key map "," 'Info-index-next) (define-key map "\177" 'Info-scroll-down) (define-key map [mouse-2] 'Info-mouse-follow-nearest-node) + (define-key map [down-mouse-2] 'ignore) ;Override potential global binding. (define-key map [follow-link] 'mouse-face) (define-key map [XF86Back] 'Info-history-back) (define-key map [XF86Forward] 'Info-history-forward)