From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Adding text properties to all Org mode links Date: Sun, 14 Jul 2013 08:41:25 +0200 Message-ID: <20130714064125.GH11006@kuru.dyndns-at-home.com> References: <20130713134027.GC11006@kuru.dyndns-at-home.com> <878v19j157.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45983) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyFzv-0007wI-Iq for emacs-orgmode@gnu.org; Sun, 14 Jul 2013 02:41:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UyFzu-0007pA-I0 for emacs-orgmode@gnu.org; Sun, 14 Jul 2013 02:41:31 -0400 Received: from mail-ee0-x235.google.com ([2a00:1450:4013:c00::235]:49014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UyFzu-0007p6-AY for emacs-orgmode@gnu.org; Sun, 14 Jul 2013 02:41:30 -0400 Received: by mail-ee0-f53.google.com with SMTP id c41so7034919eek.40 for ; Sat, 13 Jul 2013 23:41:29 -0700 (PDT) Received: from kuru.dyndns-at-home.com (sd44012d5.adsl.online.nl. [212.64.18.213]) by mx.google.com with ESMTPSA id e44sm92346195eeh.11.2013.07.13.23.41.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 13 Jul 2013 23:41:28 -0700 (PDT) Content-Disposition: inline In-Reply-To: <878v19j157.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Nick, On Sat, Jul 13, 2013 at 11:01:08PM -0400, Nick Dokos wrote: > Suvayu Ali writes: > > > Hi, > > > > How do I add text properties to org elements? In my particular case, I > > want to echo tooltips when I move my cursor over an org link (or other > > org elements for that matter). To do this, I need to add the properties > > point-left and point-entered to all org-links. How do I do that? > > > > Thanks for any ideas. > > Not sure if this is the best method: > > o go to (point-min) > o loop > (goto-char (cdr (org-element-link-successor (point-max)))) > (org-element-link-parser) and extract :begin and :end values from > the returned list > > Untested (mostly) - termination, error handling (and who knows what > else) left to the interested reader... I was afraid of this. I think the safest way of not screwing up the parsing and error handling would be to implement it as a patch to org-activate-*-links in org.el. I guess I should give some background info. Lately (>1yr), I have been using Emacs exclusively from the terminal. In a gui, hovering the mouse over a link shows you the target as a tooltip. If you turn tooltip mode off, it is shown in the echo area; but this is only in a gui frame. I think it is very important to show where a link goes in a document. I consider it good a safety practise (e.g. web browsers). Hence my attempt to implement this feature. :) Cheers, -- Suvayu Open source is the future. It sets us free.