Ihor Radchenko writes: > > Hmm. :after-element keyword logic is broken. It does not account for the > case when :after-element is past the START point. > > It is the time to refactor this function yet again. > (a tricky endeavour considering all the edge cases we can encounter when > there are changes in buffer while `org-element-cache-map' is mapping > over it). See attached for a way to break :from-pos as well. I would like to help refactor but studying this function is a little dizzying for me.