all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#22731: emacs-25: Double clicks don't get through to C-h c.
@ 2016-02-18 12:17 Alan Mackenzie
  2016-02-18 16:58 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2016-02-18 12:17 UTC (permalink / raw
  To: 22731

Hello, Emacs.

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
"<down-mouse-1> at that spot runs the command mouse-drag-region".  This
is wrong - the event handling code has got impatient and returned the
info for <down-mouse-1> 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.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22731: emacs-25: Double clicks don't get through to C-h c.
  2016-02-18 12:17 bug#22731: emacs-25: Double clicks don't get through to C-h c Alan Mackenzie
@ 2016-02-18 16:58 ` Eli Zaretskii
  2016-02-18 22:39   ` Alan Mackenzie
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2016-02-18 16:58 UTC (permalink / raw
  To: Alan Mackenzie; +Cc: 22731

> Date: Thu, 18 Feb 2016 12:17:15 +0000
> From: Alan Mackenzie <acm@muc.de>
> 
> 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
> "<down-mouse-1> at that spot runs the command mouse-drag-region".  This
> is wrong - the event handling code has got impatient and returned the
> info for <down-mouse-1> 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.

Thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22731: emacs-25: Double clicks don't get through to C-h c.
  2016-02-18 16:58 ` Eli Zaretskii
@ 2016-02-18 22:39   ` Alan Mackenzie
  2016-02-19  7:54     ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Alan Mackenzie @ 2016-02-18 22:39 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 22731

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 <acm@muc.de>
> > 
> > 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
> > "<down-mouse-1> at that spot runs the command mouse-drag-region".  This
> > is wrong - the event handling code has got impatient and returned the
> > info for <down-mouse-1> 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).





^ permalink raw reply related	[flat|nested] 5+ messages in thread

* bug#22731: emacs-25: Double clicks don't get through to C-h c.
  2016-02-18 22:39   ` Alan Mackenzie
@ 2016-02-19  7:54     ` Eli Zaretskii
  2016-02-19 20:12       ` Alan Mackenzie
  0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2016-02-19  7:54 UTC (permalink / raw
  To: Alan Mackenzie; +Cc: 22731

> Date: Thu, 18 Feb 2016 22:39:29 +0000
> Cc: 22731@debbugs.gnu.org
> From: Alan Mackenzie <acm@muc.de>
> 
> The problem also occurs with C-h k.  It's easy enough to fix, though:

Please push to master, and thanks.





^ permalink raw reply	[flat|nested] 5+ messages in thread

* bug#22731: emacs-25: Double clicks don't get through to C-h c.
  2016-02-19  7:54     ` Eli Zaretskii
@ 2016-02-19 20:12       ` Alan Mackenzie
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Mackenzie @ 2016-02-19 20:12 UTC (permalink / raw
  To: Eli Zaretskii; +Cc: 22731-done

On Fri, Feb 19, 2016 at 09:54:59AM +0200, Eli Zaretskii wrote:
> > Date: Thu, 18 Feb 2016 22:39:29 +0000
> > Cc: 22731@debbugs.gnu.org
> > From: Alan Mackenzie <acm@muc.de>

> > The problem also occurs with C-h k.  It's easy enough to fix, though:

> Please push to master, and thanks.

Done.  Marking the bug as fixed.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-19 20:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 12:17 bug#22731: emacs-25: Double clicks don't get through to C-h c Alan Mackenzie
2016-02-18 16:58 ` Eli Zaretskii
2016-02-18 22:39   ` Alan Mackenzie
2016-02-19  7:54     ` Eli Zaretskii
2016-02-19 20:12       ` Alan Mackenzie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.