Richard Lawrence <richard.lawre...@berkeley.edu> writes: > Rasmus <ras...@gmx.us> writes: > >> I don't see it as reinventing the wheel. One example, does pandoc have >> something like the ox filters? > > It does; see e.g. http://pandoc.org/scripting.html > > Pandoc filters are actually more powerful than Org filters in most > cases, because they are AST transformations. Pattern matching makes it > convenient and practical in Haskell to just transform the part of the > tree you're interested in. And because the Pandoc data structure has a > JSON serialization format, filters can be written in just about any > language, not just Haskell. > > This is an nice system, IMHO, which has one big advantage: it is > possible to write complex filters (i.e., those that do more than just > simple string manipulation) in an output-agnostic way. Pandoc filters > can do things which are generally only possible or convenient to do in > Org by creating a derived backend, which isn't output-agnostic.
For the record, you can do the same in Org with a parse tree filter. Other filters are meant to be less powerful but easier to write. Regards,