> I have no idea if it helps (apologies, if not), > but maybe take a look at library `find-where.el'. > It lets you find (forward or backward) the first > (or the Nth) buffer position where some predicate > holds. Thanks Adam. I actually find the way just now (by sheer luck). Now its reasonably fast. For anyone that’s interested, here is the code. Set sfill-variale-pitch to t and M-x sfill-paragraph on a text paragraph, and see the magic happens ;-) It would be great if some one can have a look at it and give some suggestions, especially if it can be made faster. Next I want to try to make it automatic and only fills the visible portion just-in-time. Could some one point me to some library that does similar things? Thanks.