Marcin Borkowski writes:
Hi list, my question is as in subject. It is done by org-open-at-point (somehow), but the logic seems to be buried in that function. What I'd like to have is a function that would just extract the link portion (which is normally invisible) and displayed it in the echo area (something like hovering over a link in a web browser).

This returns the link at the line, it assumes one link per line:

#+BEGIN_SRC emacs-lisp
 (defun test ()
   (save-excursion
     (move-beginning-of-line 1)
(if (search-forward-regexp org-any-link-re (line-end-position) t)
         (let* ((complete-link (match-string 0))
                (last-place (string-match "\\]" complete-link)))
(substring-no-properties complete-link 2 last-place))))

#+END_SRC

Best,

--
Jorge.


Reply via email to