Jens Schmidt <[email protected]> writes: >> - =:value-begin=, =:value-end= :: Boundaries of verbatim contents of >> inside the AST node, as buffer positions. For example, in source >> blocks, the new properties store the boundaries of the code. >> - =:pos-before-blank= :: Position after syntax node, before all its >> blank lines (for elements) or blank spaces after (for objects). >> >> These 3 new AST node properties can cover all the examples you provided >> just fine. They will also be more consistent with the existing >> org-element approach (:begin/:end, :contents-begin/end). > > Nice, in particular to get (in the long term) rid of the whitespace > skipping, which I found particularly annoying.
This is planned as a part of https://git.sr.ht/~yantar92/org-mode/log/feature/refactor-deps-v2 (When I get enough free time to continue working on that). Let me know if you think that this particular feature needs to be done in the near future. I can then look into porting it onto main. > However, I made the experience (to some extent backed up by the > examples I sent) that > > - boundaries tend to get accessed pair-wise and > > - boundaries tend to get tested for inclusion of point at the > same time they are accessed. > > `org-element-boundaries' covers both of the above. > > But then people have been happily hacking at Org mode for many > years without complaining about the lack even of your simpler > APIs, so realistically my more complex API probably never will > fly... > > I leave it to you, I can easily live with > `org-element-boundaries' existing in my .emacs only. Regardless > of where `org-element-boundaries' will live, I will redo it in > terms of your new APIs as far as possible. FYI, there is an old and broken `org-context'. It is very broken, yet we do not see many bug reports. So, I conclude that the element API is more used and dedicated function returning boundaries is not needed all that much in practice. -- 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>
