> Probably, it is easier if you just use seq-every-p instead of > mapcar on (number-sequence max-pos min-pos -1). The result of > seq-every-p will be inverse of the currently used expression. Oh yeah, that's much nicer. I also made the predicate check right-to-left, which just causes it to check the text bit of a heading first, which is useful for the cases where the predicate returns t and makes no difference otherwise. I again ran the tests and it seems ready to go. Cheers, D.