"Christopher M. Miles" <[email protected]> writes:

> I think add an "description" extraction for standard link style
> [[link][description]] is convenient for other ol.el ecosystem like link
> previewing, e.g. [[file:test.pdf][file:preview.png]]
>
> Also, Ihor, maybe this patch can simplify the function
> `org-link-preview-region` which I reviewed the commit
> "3362773397df1e05fb2cc31b9cd944ca83ab6792".

I do not like this idea.
We have enough headaches with headline parser parsing the property
drawer that is then additionally parsed as an element of its own.

Nested markup is a common theme in Org mode - we have nested markup
inside headings, drawers, sections, special blocks, and other greater
elements. All that is commonly delimited by :contents-begin/end and
stored in org-element-contents.

If anything, a useful addition could be generalized extractor of raw
contents. Something wrapping around
 (buffer-substring
   (org-element-contents-begin el)
   (org-element-contents-end el))
But only if it is actually useful in the code.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
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