bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22157: html renderer shr - Links open twice in external browser


From: Katsumi Yamaoka
Subject: bug#22157: html renderer shr - Links open twice in external browser
Date: Mon, 02 May 2016 16:31:34 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (i686-pc-cygwin)

(Last Subject: problem only seen with Gnus, not MH-E)

I don't know why it doesn't happen with MH-E, though.  I think
this is why a link opens twice:

・If a link has an image, there are two keymaps `shr-map' and
  `shr-image-map'.  `shr-map' binds `mouse-2' to `shr-browse-url',
  and `follow-link' to `mouse-face'; `shr-image-map' has a copy
  of `shr-map' bindings.
・The `follow-link' binding responds to the `mouse-1' button if
  `mouse-1-click-follows-link' is non-nil (the default).

A fix would be:

--- shr.el~     2016-04-24 22:03:10.675591200 +0000
+++ shr.el      2016-05-02 07:23:19.038316700 +0000
@@ -191,7 +191,7 @@
     map))
 
 (defvar shr-image-map
-  (let ((map (copy-keymap shr-map)))
+  (let ((map (make-sparse-keymap)))
     (when (boundp 'image-map)
       (set-keymap-parent map image-map))
     map))

I realized why I wasn't troubled with such a problem is that
I've set `mouse-1-click-follows-link' to nil years ago. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]