From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#22731: emacs-25: Double clicks don't get through to C-h c. Date: Thu, 18 Feb 2016 22:39:29 +0000 Message-ID: <20160218223928.GB2697@acm.fritz.box> References: <20160218121715.GC1769@acm.fritz.box> <83vb5mt0p5.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1455835106 5697 80.91.229.3 (18 Feb 2016 22:38:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Feb 2016 22:38:26 +0000 (UTC) Cc: 22731@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Feb 18 23:38:11 2016 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 1aWXD8-00053T-Ko for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Feb 2016 23:38:10 +0100 Original-Received: from localhost ([::1]:46256 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWXD8-0003bR-2M for geb-bug-gnu-emacs@m.gmane.org; Thu, 18 Feb 2016 17:38:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56592) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWXD3-0003b3-Oh for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 17:38:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aWXD0-0007S8-IU for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 17:38:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36176) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aWXD0-0007S3-Ed for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 17:38:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aWXD0-0007Ye-4h for bug-gnu-emacs@gnu.org; Thu, 18 Feb 2016 17:38: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: Thu, 18 Feb 2016 22:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22731 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 22731-submit@debbugs.gnu.org id=B22731.145583502928985 (code B ref 22731); Thu, 18 Feb 2016 22:38:02 +0000 Original-Received: (at 22731) by debbugs.gnu.org; 18 Feb 2016 22:37:09 +0000 Original-Received: from localhost ([127.0.0.1]:33303 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWXC9-0007XR-13 for submit@debbugs.gnu.org; Thu, 18 Feb 2016 17:37:09 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:12849) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aWXC6-0007XI-Db for 22731@debbugs.gnu.org; Thu, 18 Feb 2016 17:37:06 -0500 Original-Received: (qmail 29974 invoked by uid 3782); 18 Feb 2016 22:37:05 -0000 Original-Received: from acm.muc.de (p548A4834.dip0.t-ipconnect.de [84.138.72.52]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 18 Feb 2016 23:37:03 +0100 Original-Received: (qmail 12365 invoked by uid 1000); 18 Feb 2016 22:39:29 -0000 Content-Disposition: inline In-Reply-To: <83vb5mt0p5.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) 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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113262 Archived-At: Hi, Eli. On Thu, Feb 18, 2016 at 06:58:30PM +0200, Eli Zaretskii wrote: > > Date: Thu, 18 Feb 2016 12:17:15 +0000 > > From: Alan Mackenzie > > > > In the emacs-25 branch, start Emacs with emacs -Q. > > > > In the *scratch* buffer, do C-h c followed by a double click on the left > > mouse button. > > > > Examine the *Messages* buffer. There it will be reported that > > " at that spot runs the command mouse-drag-region". This > > is wrong - the event handling code has got impatient and returned the > > info for rather than waiting for the actual complete > > event which is a double click. > > > > However, a double click in the *scratch* buffer without C-h c is read > > correctly, marking the word under the mouse. It would be nice to be > > able to find out what this command is that does the marking. > We never had such a feature in Emacs, AFAICS, so you are asking for an > enhancement. OK, I read the fine manual a little bit, and discovered that on a double click, the Emacs core generates 4 events: a down-mouse, a click, a double-down-mouse, then a double-click. And naturally enough, C-h c only responds to the first event. This is crazy: if somebody only wants to read about a down-mouse, they'd only have clicked a down-mouse. Anybody doing a double-click to C-h c clearly wants to know what's bound to that, not to the mouse-down. To me, it's definitely a bug. The problem also occurs with C-h k. It's easy enough to fix, though: diff --git a/lisp/help.el b/lisp/help.el index 061daac..6f57159 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -613,7 +613,10 @@ describe-key-briefly (when (null (cdr yank-menu)) (setq saved-yank-menu (copy-sequence yank-menu)) (menu-bar-update-yank-menu "(any string)" nil)) - (setq key (read-key-sequence "Describe key (or click or menu item): ")) + (while + (progn + (setq key (read-key-sequence "Describe key (or click or menu item): ")) + (not (sit-for (/ double-click-time 1000.0) t)))) ;; Clear the echo area message (Bug#7014). (message nil) ;; If KEY is a down-event, read and discard the @@ -750,7 +753,10 @@ describe-key (when (null (cdr yank-menu)) (setq saved-yank-menu (copy-sequence yank-menu)) (menu-bar-update-yank-menu "(any string)" nil)) - (setq key (read-key-sequence "Describe key (or click or menu item): ")) + (while + (progn + (setq key (read-key-sequence "Describe key (or click or menu item): ")) + (not (sit-for (/ double-click-time 1000.0) t)))) (list key (prefix-numeric-value current-prefix-arg) > Thanks. -- Alan Mackenzie (Nuremberg, Germany).