Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Hello, > > Thorsten Jolitz <tjol...@gmail.com> writes: > >> now that I understand the 'org-element API' a bit better, I think that >> the following two functions can be very useful for creating and >> modifying Org elements without the usual point movements, regexp >> searches and string operations in a buffer: > > Element isn't really meant to provide tools to modify the buffer. It is > only a parser, i.e. buffer to parse tree transformation. > > The reciprocal, i.e., modifying a parse tree in order to alter the > buffer may belong to another library. IIRC, this is the goal of > "org-sync" (from GSOC 2012). You may want to look into it.
Sorry, did not read this before writing my other recent post ... I will have a look at org-sync, but even if Element isn't really meant to provide tools to modify the buffer, it seems to be tremendously useful in doing so? The most limiting aspect I found is the missing access to an elements content (see my parallel post wrt to this topic). Otherwise 'rewiring' an elements internals looks like a huge productivity booster compared to the usual buffer operations on the textual representation. As long as the interpreter works as expected, and it does! -- cheers, Thorsten