From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Matthew Woodcraft Newsgroups: gmane.emacs.bugs Subject: bug#18212: 24.3.92; Left-click on a button is treated as mouse-2 Date: Thu, 7 Aug 2014 22:02:28 +0100 Message-ID: <20140807210228.GA11175@golux.woodcraft.me.uk> References: <87vbq5nypa.fsf@golux.woodcraft.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1407445409 15886 80.91.229.3 (7 Aug 2014 21:03:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 Aug 2014 21:03:29 +0000 (UTC) Cc: 18212@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 07 23:03:22 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 1XFUqH-0002NX-TG for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2014 23:03:22 +0200 Original-Received: from localhost ([::1]:48175 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFUqH-0000c2-FF for geb-bug-gnu-emacs@m.gmane.org; Thu, 07 Aug 2014 17:03:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFUq6-0000at-Mi for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 17:03:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XFUpz-0002dX-7c for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 17:03:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XFUpz-0002dT-4R for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 17:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XFUpy-0002EM-Fm for bug-gnu-emacs@gnu.org; Thu, 07 Aug 2014 17:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Matthew Woodcraft Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Aug 2014 21:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18212 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18212-submit@debbugs.gnu.org id=B18212.14074453548534 (code B ref 18212); Thu, 07 Aug 2014 21:03:02 +0000 Original-Received: (at 18212) by debbugs.gnu.org; 7 Aug 2014 21:02:34 +0000 Original-Received: from localhost ([127.0.0.1]:34344 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFUpW-0002DZ-1N for submit@debbugs.gnu.org; Thu, 07 Aug 2014 17:02:34 -0400 Original-Received: from hark.woodcraft.me.uk ([80.68.94.88]:48998) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XFUpT-0002DQ-SO for 18212@debbugs.gnu.org; Thu, 07 Aug 2014 17:02:32 -0400 Original-Received: from cpc1-cmbg1-0-0-cust269.5-4.cable.virginm.net ([82.21.97.14] helo=golux.woodcraft.me.uk) by hark.woodcraft.me.uk with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1XFUpR-00029V-JC; Thu, 07 Aug 2014 22:02:29 +0100 Original-Received: from mjw by golux.woodcraft.me.uk with local (Exim 4.80) (envelope-from ) id 1XFUpQ-0003oQ-SM; Thu, 07 Aug 2014 22:02:28 +0100 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) 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:92286 Archived-At: Stefan Monnier wrote: > 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 see. > I installed the workaround below, > --- 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) Is that the right place for the workaround? The problem happens for any link, not just those in info mode. Maybe there's some way to behave more like 24.3, where (as far as I can make out from describe-key output) left-click on a link gives down-mouse-1 followed by mouse-2? (This issue isn't causing me any problems; I'm just testing the pretest. I had imenu bound to down-mouse-2 because it's slightly more responsive than mouse-2, and left-clicking to follow links stopped working altogether until I found out what was responsible. So I suppose it might cause trouble for other people when they upgrade.) -M-