Subject: bug#14815: 24.3.50; eww (Hyperlinks): Left mouse click on hyperlinks does nothing

From: Jambunathan K <[email-masked]>
Date: Mon, 08 Jul 2013 22:04:30 +0530

Lars Magne Ingebrigtsen <[email-masked]> writes:

> Jambunathan K <[email-masked]> writes:
>
>> Currently left-clicking on the hyperlinks doesn't take me to the link.
>> (RET works though)
>
> I'd like to, but I don't know how.  This is how the local keymap is
> defined:
>
> (defvar shr-map
>   (let ((map (make-sparse-keymap)))
>
> [...]
>
>     (define-key map [follow-link] 'mouse-face)
>
> What's the real way to define mouse actions these days?

C-u C-x = on Orgmode links shows this:

    (keymap
     (follow-link . mouse-face)
     (mouse-3 . org-find-file-at-mouse)
     (mouse-2 . org-open-at-mouse))

Define keymap

    (defvar org-mouse-map (make-sparse-keymap))
    (org-defkey org-mouse-map [mouse-2] 'org-open-at-mouse)
    (org-defkey org-mouse-map [mouse-3] 'org-find-file-at-mouse)

Mouse click handlers.

    (defun org-open-at-mouse (ev)
      "Open file link or URL at mouse.
    See the docstring of `org-open-file' for details."
      (interactive "e")
      (mouse-set-point ev)
      (org-open-at-point))

    (defun org-find-file-at-mouse (ev)
      "Open file link or URL at mouse."
      (interactive "e")
      (mouse-set-point ev)
      (org-open-at-point 'in-emacs))