Stefan Monnier writes: >> See attached fix to fix the bug found by Eason's steps quoted above. >> The bug was that we ignored the "before markers" part of >> `insert-before-markers'. > > I pushed a similar fix a few hours earlier, sorry :-) Your fix was better! ;) >> Stefan, this and a couple other minor patches are in >> https://git.sr.ht/~matta/emacs/log/scratch/matta/for_stefan > > Could you rebase the remaining minor patches? Done (patches here and at my sr.ht). Basically, I rewrote the test in a way that was clearer, at lest for me, and more exhaustive. Moved them down to the other tests related to inserting and moving overlays. Used explicit buffer positions instead of (point) as a relative reference (which confused me and seemed unrelated, since neither `insert-before-markers` nor the overlay code is ever concerned with (point). If you don't like that, we I think we should still tweak the one new test to not attempt (goto-char (2+ (point))) when point is at eob. :-)