all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: 22157@debbugs.gnu.org
Subject: bug#22157: html renderer shr - Links open twice in external browser
Date: Mon, 13 Jun 2016 10:22:20 +0900	[thread overview]
Message-ID: <b4mvb1dvq5v.fsf@jpl.org> (raw)
In-Reply-To: <19694.1449984793@allegro.localdomain>

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.





  reply	other threads:[~2016-06-13  1:22 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <19694.1449984793@allegro.localdomain>
2016-02-01  1:19 ` bug#22157: still present in 25.0.90 Mike Kupfer
     [not found] ` <m2vb349303.fsf@krugs.de>
2016-04-28  3:47   ` bug#22157: html renderer shr - Links open twice in external browser Mike Kupfer
2016-04-28  7:43     ` Rainer M Krug
2016-04-28 17:43 ` bug#22157: problem only seen with Gnus, not MH-E Mike Kupfer
2016-05-02  7:31   ` bug#22157: html renderer shr - Links open twice in external browser Katsumi Yamaoka
2016-05-02  9:59     ` Katsumi Yamaoka
2016-05-06  1:37       ` Katsumi Yamaoka
2016-05-06  8:43         ` Nicolas Petton
2016-06-10  8:35           ` Katsumi Yamaoka
2016-06-10  9:23             ` Stephen Berman
2016-06-10 13:58               ` martin rudalics
2016-06-13  1:22                 ` Katsumi Yamaoka [this message]
2016-06-22 10:41                   ` Katsumi Yamaoka

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=b4mvb1dvq5v.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=22157@debbugs.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.