From: asjo@koldfront.dk (Adam Sjøgren)
To: ding@gnus.org
Subject: Left-clicking on a link in an shr-rendered HTML article opens the link twice
Date: Thu, 16 Feb 2017 13:22:32 +0100 [thread overview]
Message-ID: <87o9y2wcjb.fsf@koldfront.dk> (raw)
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
next reply other threads:[~2017-02-16 12:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-16 12:22 Adam Sjøgren [this message]
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
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=87o9y2wcjb.fsf@koldfront.dk \
--to=asjo@koldfront.dk \
--cc=ding@gnus.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.
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).