emacs-orgmode
[Top][All Lists]
Advanced

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

Re: Org-mode element API: How to extract link description


From: Ihor Radchenko
Subject: Re: Org-mode element API: How to extract link description
Date: Sun, 18 Aug 2024 13:17:13 +0000

Sébastien Gendre <seb@k-7.ch> writes:

> With the Org-mode element API, when I get an element of type "link", how
> do I extract the link description ?

> It's not a property of a link, from what I can see in when explore the
> content of a link element. And I found nothing on the documentation.

Link description is considered to be link contents.
But do note that simple `org-element-at-point' does not compute
contents. It is only available in the full parse tree. From
`org-element-at-point', a practical way to retrieve description text is
using substring between :contents-begin/end.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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