From mboxrd@z Thu Jan 1 00:00:00 1970 From: Suvayu Ali Subject: Re: Adding text properties to all Org mode links Date: Tue, 10 Sep 2013 13:39:11 +0200 Message-ID: <20130910113911.GU20690@kuru.dyndns-at-home.com> References: <20130713134027.GC11006@kuru.dyndns-at-home.com> <878v19j157.fsf@gmail.com> <20130714064125.GH11006@kuru.dyndns-at-home.com> <20130909231542.GN20690@kuru.dyndns-at-home.com> <87hadtdv1l.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]:34195) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJMHt-0004GW-E9 for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 07:39:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJMHs-0005gR-2Y for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 07:39:17 -0400 Received: from mail-ee0-x233.google.com ([2a00:1450:4013:c00::233]:62025) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJMHr-0005fQ-RI for emacs-orgmode@gnu.org; Tue, 10 Sep 2013 07:39:15 -0400 Received: by mail-ee0-f51.google.com with SMTP id c1so3830817eek.10 for ; Tue, 10 Sep 2013 04:39:15 -0700 (PDT) Content-Disposition: inline In-Reply-To: <87hadtdv1l.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: Jambunathan K Cc: emacs-orgmode@gnu.org Hi Jambu, On Tue, Sep 10, 2013 at 12:26:22PM +0530, Jambunathan K wrote: > > Add salt to taste or cookup your own recipe based on the hints here. > > (add-hook 'org-mode-hook > (lambda nil > (setq-local default-text-properties > '(point-entered org-link-entered-maybe)))) > > (defun org-link-entered-maybe (op np) > (when (derived-mode-p 'org-mode) > ;; (message "In org-link-entered-maybe") > (let* ((inhibit-point-motion-hooks t) > (ctx (org-element-context))) > (when (eq 'link (org-element-type ctx)) > (tooltip-show (org-element-property :raw-link ctx) > (not 'use-echo-area)))))) I can't see the properties. This is what I tried: (add-hook 'org-mode-hook (lambda nil ;; (setq-local default-text-properties ;; '(point-entered org-link-entered-maybe point-left org-link-entered-maybe)) (setq-local default-text-properties '(point-entered sa-echo-tooltip point-left sa-echo-tooltip)) )) Where sa-echo-tooltip is my function. Then I open the following Org file: ------8<---------8<---------- #+TITLE: Test adding text properties to links #+STARTUP: showeverything * Links - [[https://www.google.com][Google]] - https://en.wikipedia.org/wiki/Main_page ------8<---------8<---------- With my cursor on the 2 links, I see the following with describe-char: There are text properties here: face org-link font-lock-multiline t fontified t help-echo "LINK: https://www.google.com" htmlize-link (:uri "https://www.google.com") keymap [Show] mouse-face highlight org-no-flyspell t There are text properties here: face org-link fontified t htmlize-link (:uri "https://en.wikipedia.org/wiki/Main_page") keymap [Show] mouse-face highlight org-no-flyspell t As you see there is no mention of point-left or point-entered. Any ideas? -- Suvayu Open source is the future. It sets us free.