>>> I've now come up with the code as shown in the attachment. It >>> works fine, however, I would like to not have empty lines; in >>> other words, invisible text should not take any space in the >>> buffer. Does Emacs supports such a `compressed invisibility'? >> >> >> Make the newline invisible. > > Thanks! This perhaps deserves a notice in the documentation. I've now tried the code with my real-world table (containing approx. 420000 lines): git://repo.or.cz/srv/git/wortliste.git and I found out that it is, alas, unusable. It starts with about 1000 replacements per second on my GNU/Linux box (using simply `-' as the regexp), but soon the speed decreases: After approx. 10000 replacements it only can handle 100 replacements per second -- the attached code now contains a small counter to show the progress. If you comment out the call to `make-overlay', the code really flies... Am I doing something wrong? Werner