I just noticed that a suggestion of mine for preserving markers when inserting has made it into longlines.el. In my private copy, I also have the following fix in. Since I rarely use longlines.el, it has seen only cursory testing. Does anybody see a particular problem with it? If not, maybe we should check it in so that it gets some testing.