From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.bugs Subject: bug#22157: html renderer shr - Links open twice in external browser Date: Mon, 02 May 2016 18:59:51 +0900 Organization: Emacsen advocacy group Message-ID: References: <19694.1449984793@allegro.localdomain> <8777.1461865387@allegro.localdomain> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1462183252 25133 80.91.229.3 (2 May 2016 10:00:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 May 2016 10:00:52 +0000 (UTC) To: 22157@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 02 12:00:41 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1axAeV-00069Q-Pg for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2016 12:00:31 +0200 Original-Received: from localhost ([::1]:35936 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axAeR-000360-QR for geb-bug-gnu-emacs@m.gmane.org; Mon, 02 May 2016 06:00:27 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37788) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axAeI-0002t2-V1 for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:00:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1axAe7-0002hD-9m for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:00:13 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1axAe7-0002eF-7T for bug-gnu-emacs@gnu.org; Mon, 02 May 2016 06:00:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1axAe2-0000Pq-Uq; Mon, 02 May 2016 06:00:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <19694.1449984793@allegro.localdomain> Resent-From: Katsumi Yamaoka Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bugs@gnus.org Resent-Date: Mon, 02 May 2016 10:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22157 X-GNU-PR-Package: emacs,gnus X-GNU-PR-Keywords: Original-Received: via spool by 22157-submit@debbugs.gnu.org id=B22157.14621831991558 (code B ref 22157); Mon, 02 May 2016 10:00:02 +0000 Original-Received: (at 22157) by debbugs.gnu.org; 2 May 2016 09:59:59 +0000 Original-Received: from localhost ([127.0.0.1]:33024 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axAdz-0000P4-D4 for submit@debbugs.gnu.org; Mon, 02 May 2016 05:59:59 -0400 Original-Received: from mail-hampton.hostforweb.net ([205.234.186.191]:41007 helo=hampton.hostforweb.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axAdx-0000Oo-D2 for 22157@debbugs.gnu.org; Mon, 02 May 2016 05:59:57 -0400 Original-Received: from s70.gtokyofl21.vectant.ne.jp ([202.215.75.70]:62053 helo=localhost) by hampton.hostforweb.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.87) (envelope-from ) id 1axAdq-001QLD-4R; Mon, 02 May 2016 04:59:51 -0500 X-Face: #kKnN,xUnmKia.'[pp`; Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu; B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (i686-pc-cygwin) Cancel-Lock: sha1:Ei22P37aAGBjBZhODtmkCQGO0Kg= X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hampton.hostforweb.net X-AntiAbuse: Original Domain - debbugs.gnu.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Get-Message-Sender-Via: hampton.hostforweb.net: authenticated_id: yamaoka/from_h X-Authenticated-Sender: hampton.hostforweb.net: yamaoka@jpl.org X-Source: X-Source-Args: X-Source-Dir: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:117561 Archived-At: On Mon, 02 May 2016 16:31:34 +0900, Katsumi Yamaoka wrote: > I think this is why a link opens twice: > =E3=83=BBIf 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. No. There are three keymaps. The other one is that of the widget button, that `mm-convert-shr-links' creates. This might be the reason why it doesn't happen with MH-E. > =E3=83=BBThe `follow-link' binding responds to the `mouse-1' button if > `mouse-1-click-follows-link' is non-nil (the default). But I don't know why it responds to a single `mouse-1' click twice so far. It might otherwise not be the cause. > 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)) This fixes the problem anyway. I tried making a simple test program that reproduce the `twice' problem, but haven't succeeded in it yet.