Jens Schmidt <jschmidt4...@vodafonemail.de> writes: > It's been a while since my question on this mailing list about block > boundaries [1]. For my private code I came up with the function below > to both get and test on all sorts of block boundaries. Like this: > > (and-let* ((element (or element (org-element-at-point))) > ;; returns nil if point is outside of markup > (boundaries (org-element-boundaries element 'markup t)) > (start (car boundaries)) > (end (cdr boundaries))) > ...) > > API and code are surely rather sound than ingenious, but if you > consider it (or some variation of it) useful for inclusion into Org > mode, just let me know, I'd prepare a proper patch plus tests plus ... > > The second part of the code is for interactive testing only. > > If you feel I should provide examples where this could be actually > used in Org's code base, just let me know - I can set up some example > patches as well.
Having example would help. What I have in mind for what you propose could be solved by exposing more checkpoints from org-element API. -- 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>