"J.D. Smith" <[email protected]> writes:

> Perhaps finding the *topmost* emphasis/link ancestor is the right
> approach; can anyone recommend a way to do that?
>
> Currently using:
>
>   (when-let* ((ctx (org-element-context)))
>       (org-element-lineage ctx '( link bold code italic verbatim
>                                   underline strike-through) t))

topmost makes sense, especially considering the cursor shape.

org-element-lineage-map could be useful to find the topmost.

-- 
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