GNU bug report logs - #22157
left-clicking on a link: 2 browsers or a warning

Previous Next

Packages: gnus, emacs;

Reported by: Mike Kupfer <m.kupfer <at> acm.org>

Date: Sun, 13 Dec 2015 05:34:02 UTC

Severity: normal

Done: Katsumi Yamaoka <yamaoka <at> jpl.org>

Bug is archived. No further changes may be made.

Full log


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

From: Katsumi Yamaoka <yamaoka <at> jpl.org>
To: 22157 <at> debbugs.gnu.org
Subject: Re: bug#22157: html renderer shr - Links open twice in external
 browser
Date: Mon, 13 Jun 2016 10:22:20 +0900
On Fri, 10 Jun 2016 15:58:42 +0200, martin rudalics wrote:
>> When viewing an HTML email using shr, when I left-click on a link, Gnus
>> starts 2 browsers and directs each to the URL for the link.

> One for the down and one for the up event, I suppose.

Left-click causes invoking `widget-button-click' by the mouse-1
event, and `shr-browse-url' by the mouse-2 event 0.6 sec after
(I tested it by adding a logger code to each function).  But
middle-click invokes only `widget-button-click' by down-mouse-2.
At the link position, there are two keymaps[1]:

There is an overlay here:
 From 876 to 882
  button               url-link (widget)Top
  evaporate            t
  face                 nil
  follow-link          nil
  help-echo            [Show]
	-> "https://www.amazon.co.jp/..."
  keymap               [Show]
	-> (keymap ...(mouse-2 . shr-browse-url) (follow-link . mouse-face)...
  mouse-face           (highlight)
  pointer              hand

There are text properties here:
  face                 (variable-pitch shr-link (:foreground "#333333")...
  follow-link          t
  help-echo            [Show]
	-> "https://www.amazon.co.jp/..."
  keymap               [Show]
	-> (keymap ...(mouse-2 . shr-browse-url) (follow-link . mouse-face)...
  local-map            nil
  mouse-face           highlight
  shr-url              [Show]
	-> (the same as the help-echo string)

IIUC, the overlay is what `mm-convert-shr-links' adds, and the
text properties are what `shr-urlify' adds.  Though Lars wrote
in 2013-06-17 as follows, is it really necessary?

 * mm-decode.el (mm-convert-shr-links): Override the shr local map, so
 that Gnus commands work.

[1] I wrote "there are three keymaps" last month but it's wrong,
probably.




This bug report was last modified 8 years and 336 days ago.

Previous Next


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