emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] clickable text in org-mode not working


From: Sebastien Vauban
Subject: Re: [O] clickable text in org-mode not working
Date: Tue, 13 Nov 2012 09:50:19 +0100
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (windows-nt)

Hello John,

John Kitchin wrote:
> It appears that one cannot define "clickable" text in org-mode. I was
> trying to make some text in an org-file respond to different types of
> clicking. I know that links provide some functionality for this, but
> out of curiosity I wanted to see what else I could do.
>
> If I run the following code on a buffer in text-mode, the first four
> characters in the buffer turn blue with a white background, they turn
> a light green when the mouse is over them, and finally a message box
> pops up when I click on the characters.
>
> (let ((map (make-sparse-keymap)))
>      (define-key map (kbd "<down-mouse-1>")
>             '(lambda() (interactive) (message-box "it works!")))
>      (add-text-properties 1 5 `(keymap, map
>                                 font-lock-face (:foreground "blue"
>                                                 :background "white")
>                                 mouse-face highlight)))
>
> If I switch to org-mode, the clickability and mouse highlighting go
> away. They also do not appear when I run the function in an
> org-buffer.
>
> Does anyone know if there is a feature in org-mode that turns this
> off, or if there is a way to get the clickability to work? Is it
> related to having links that are clickable?

I'm not sure to understand your use case -- why do you want clickable text in
the first place (other than links)?

But, did you look at `org-add-link-type' which does allow some kind of
powerful stuff (mainly for export, but can maybe be diverted from its original
purpose)?

I guess you also are aware of the elisp and shell links you can already put in
any Org file, as clickable "buttons"?

Best regards,
  Seb

-- 
Sebastien Vauban




reply via email to

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