GNU bug report logs - #53170
29.0.50; Can't repetitively click next node button inside Info header line

Previous Next

Package: emacs;

Reported by: Po Lu <luangruo <at> yahoo.com>

Date: Tue, 11 Jan 2022 02:17:01 UTC

Severity: normal

Found in version 29.0.50

Done: Po Lu <luangruo <at> yahoo.com>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 53170 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: luangruo <at> yahoo.com, 53170 <at> debbugs.gnu.org
Subject: Re: bug#53170: 29.0.50; Can't repetitively click next node button
 inside Info header line
Date: Wed, 12 Jan 2022 19:20:40 +0200
>> Then these bindings are interfering:
>>
>>     (define-key keymap [header-line down-mouse-1] 'mouse-drag-header-line)
>>     (define-key keymap [header-line mouse-1] 'mouse-select-window)
>>
>> The problem can be fixed by replacing these lines with:
>>
>>     (define-key keymap [header-line mouse-1] 'Info-mouse-follow-link)
>>
>> But I don't know how important is the feature of selecting/dragging the header-line?
>
> I don't think I understand how 2 clicks one after another are taken as
> a drag-mouse event.  Can you tell why this happens?

Actually, its's mouse-select-window that steals the click.
There is no need to bind mouse-1 to mouse-select-window
because the window is selected anyway, so this patch fixes
the reported problem:

diff --git a/lisp/info.el b/lisp/info.el
index f4f0f9790c..bb8cd0d312 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -4693,7 +4693,7 @@ Info-goto-emacs-key-command-node
 (defvar Info-link-keymap
   (let ((keymap (make-sparse-keymap)))
     (define-key keymap [header-line down-mouse-1] 'mouse-drag-header-line)
-    (define-key keymap [header-line mouse-1] 'mouse-select-window)
+    (define-key keymap [header-line mouse-1] 'Info-mouse-follow-link)
     (define-key keymap [header-line mouse-2] 'Info-mouse-follow-link)
     (define-key keymap [mouse-2] 'Info-mouse-follow-link)
     (define-key keymap [follow-link] 'mouse-face)
-- 





This bug report was last modified 3 years and 119 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.