[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#14815: 24.3.50; eww (Hyperlinks): Left mouse click on hyperlinks doe

From: Jambunathan K
Subject: bug#14815: 24.3.50; eww (Hyperlinks): Left mouse click on hyperlinks does nothing
Date: Mon, 08 Jul 2013 22:04:30 +0530
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Lars Magne Ingebrigtsen <address@hidden> writes:

> Jambunathan K <address@hidden> 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:

     (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)

    (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))

reply via email to

[Prev in Thread] Current Thread [Next in Thread]