From: Alan Mackenzie <acm@muc.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22731@debbugs.gnu.org
Subject: bug#22731: emacs-25: Double clicks don't get through to C-h c.
Date: Thu, 18 Feb 2016 22:39:29 +0000 [thread overview]
Message-ID: <20160218223928.GB2697@acm.fritz.box> (raw)
In-Reply-To: <83vb5mt0p5.fsf@gnu.org>
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).
next prev parent reply other threads:[~2016-02-18 22:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2016-02-19 7:54 ` Eli Zaretskii
2016-02-19 20:12 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160218223928.GB2697@acm.fritz.box \
--to=acm@muc.de \
--cc=22731@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.