emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: emacs-orgmode@gnu.org
Subject: clickable text in org-mode not working
Date: Mon, 12 Nov 2012 13:42:51 -0500	[thread overview]
Message-ID: <CAJ51EToNYc-b3SsMpt5KyWqGVNa2tN74unqmfzejcDDj8opBXA@mail.gmail.com> (raw)

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?

Thanks,

John

-----------------------------------
John Kitchin
Associate Professor
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
http://kitchingroup.cheme.cmu.edu

             reply	other threads:[~2012-11-12 18:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-12 18:42 John Kitchin [this message]
2012-11-13  8:50 ` clickable text in org-mode not working Sebastien Vauban

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJ51EToNYc-b3SsMpt5KyWqGVNa2tN74unqmfzejcDDj8opBXA@mail.gmail.com \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).