all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to execute code on cursor move
@ 2013-07-13 10:39 Suvayu Ali
  2013-07-13 11:03 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Suvayu Ali @ 2013-07-13 10:39 UTC (permalink / raw)
  To: Emacs help

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.



^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <<20130713103903.GA11006@kuru.dyndns-at-home.com>]

end of thread, other threads:[~2013-07-13 15:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-13 10:39 How to execute code on cursor move Suvayu Ali
2013-07-13 11:03 ` Eli Zaretskii
2013-07-13 13:28   ` Suvayu Ali
     [not found] <<20130713103903.GA11006@kuru.dyndns-at-home.com>
     [not found] ` <<83vc4e4t8a.fsf@gnu.org>
2013-07-13 13:26   ` Drew Adams
2013-07-13 15:32     ` Suvayu Ali

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.