help-gnu-emacs
[Top][All Lists]
Advanced

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

How to execute code on cursor move


From: Suvayu Ali
Subject: How to execute code on cursor move
Date: Sat, 13 Jul 2013 12:39:03 +0200
User-agent: Mutt/1.5.21 (2012-12-30)

Hi,

I want to check a text property and display in the minibuffer depending
on context (in my case, on an org-link).

This is what I have so far (working):

(add-hook 'post-command-hook
          (lambda()
            (if (eq (get-text-property (point) 'face) 'org-link)
                (display-message-or-buffer
                 (get-text-property (point) 'help-echo)))))

Is using the post-command-hook a good idea?  Is there something better?
As you can see, I'm trying to get the link target; are there better ways
to do this?

Thanks for any ideas.

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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