Gnus development mailing list
 help / color / mirror / Atom feed
* Left-clicking on a link in an shr-rendered HTML article opens the link twice
@ 2017-02-16 12:22 Adam Sjøgren
  2017-02-16 17:12 ` Mike Kupfer
  0 siblings, 1 reply; 5+ messages in thread
From: Adam Sjøgren @ 2017-02-16 12:22 UTC (permalink / raw)
  To: ding

Am I the only one with this problem: If I open an HTML article in Gnus,
rendered by shr, and left-click a link, almost all the time, the link is
opened twice in my [external] browser?

What seems to happen is that first widget-button-click fires, and calls
browse-url which opens the link in my browser, and then shr-browse-url
fires, which also calls browse-url and opens the link in my browser a
second time.

Middle-clicking on the link only opens it once, but it's kind of
annoying to have to remember to middle-click.

I tried fixing it with:

  (define-key shr-map (kbd "[mouse-2]") nil)

but that was too wild a guess. Now I have this instead, which works:

  (setq shr-map
    (let ((map (make-sparse-keymap)))
      (define-key map "a" 'shr-show-alt-text)
      (define-key map "i" 'shr-browse-image)
      (define-key map "z" 'shr-zoom-image)
      (define-key map [?\t] 'shr-next-link)
      (define-key map [?\M-\t] 'shr-previous-link)
      (define-key map [follow-link] 'mouse-face)
      ; (define-key map [mouse-2] 'shr-browse-url)
      (define-key map "I" 'shr-insert-image)
      (define-key map "w" 'shr-copy-url)
      (define-key map "u" 'shr-copy-url)
      (define-key map "v" 'shr-browse-url)
      (define-key map "O" 'shr-save-contents)
      (define-key map "\r" 'shr-browse-url)
      map))

... but it seems kind of wrong?


  Best regards,

    Adam

-- 
 "I need someone to throw blue sky at me"                     Adam Sjøgren
                                                         asjo@koldfront.dk




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-02-17 10:41 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16 12:22 Left-clicking on a link in an shr-rendered HTML article opens the link twice Adam Sjøgren
2017-02-16 17:12 ` Mike Kupfer
2017-02-16 17:54   ` Adam Sjøgren
2017-02-16 23:18     ` Katsumi Yamaoka
2017-02-17 10:41       ` Adam Sjøgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).