Rasmus writes: >> AFAICT, there's no reason to include a rule about whitespace separating >> anything. Just make sure that any INCLUDE keyword that doesn't have >> a :minlevel property gets one set to 1+N, where N is the current level >> (or 0 if at top level). >> >> Another option is to delay insertion of included files: expand them >> completely in different strings, then replace keywords with appropriate >> strings. IOW, just make sure expansion doesn't happen sequentially. > > OK. Solution one sounds easier. A quick attempt, without tests, is given > in the second patch. I'll add patches if you agree with the easy > approach. It seems to work, though I'm not sure if the matching of > headlines which should have :minlevel added is robust enough. Here's a new version of the second patch with tests. The recognition regexp is still not great, but the idea of the regexp is to only act on includes where there's no :minlevel already and no plain words (most obviously src and example, but any block really) when disregarding ":key value" pairs. At least all tests are passed... —Rasmus -- This is the kind of tedious nonsense up with which I will not put