Now it works reasonably well in text-mode. But I haven’t give it a lot of test. You can M-x sfill-mode in any text buffer to use it. One small issue is that it is not very fast when wrapping variable-pitch fonts. I think most of the time is spent around pos-visible-in-window-p and posn-at-x-y. I use them to find the rough place to break the line. Is there faster ways to to that? Basically I want to know the point at about certain column. Currently I’m using (posn-point (posn-at-x-y …)). Yuan