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

From: Stephen Berman <[email-masked]>
Date: Fri, 10 Jun 2016 11:23:04 +0200

[resending to the bug list, after unarchiving the bug]

On Fri, 10 Jun 2016 17:35:04 +0900 Katsumi Yamaoka <[email-masked]> wrote:

> On Fri, 06 May 2016 10:43:09 +0200, Nicolas Petton wrote:
>> Katsumi Yamaoka <[email-masked]> writes:
>>> The change 72166f2f3dba18f1217c666574032f5a0351ed65 seems to have
>>> fixed this bug.
>> I'm closing it then.
>
> The bug has come back by the change[1] done in master two hours
> ago in relation to bug#23571.  I vaguely guessed this is due to
> something bad in Gnus' way[2] but haven't resolved yet.
>
> Thanks.
>
> [1] Revert "Bind `widget-button-click' to mouse-1/-2 instead of down-mouse-1/-2"
> <http://lists.gnu.org/archive/html/emacs-diffs/2016-06/msg00069.html>
>
> [2] There are three keymaps in the article buffer
> <https://lists.gnu.org/archive/html/bug-gnu-emacs/2016-05/msg00074.html>

I didn't know this bug had also been connected with commit 72166f.  I
just tried to reproduce it on my master branch, which still has the
commit (I have not yet updated since Martin reverted it), and here are
my results (the indented lines are quotes from the OP):

   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.

I still see this on master with commit 72166f (in my case it's two tabs
on one browser instance).

   When viewing a plaintext email that contains a URL, when I left-click
   on the URL, Gnus starts a browser for that URL okay, but I also get a
   message like
   
     Buffer is read-only: #<buffer *Article gnu.emacs.gnus*>

I do not see this on master with commit 72166f, but I do see it without
that commit.

   In both cases (HTML, plaintext) middle-clicking on the link/URL works
   okay.

For me too on master with commit 72166f.

In short, the now reverted commit does not completely fix this bug for
me.  And since it introduced bug#23571, which for me is more annoying
than bug#22157, I would prefer it not to be simply recomitted; hopefully
a better fix can be found.

Steve Berman