Max Nikulin writes: >> I am unable to reproduce on the latest Org. > > Thank you, Ihor. I have checked it once more for current main HEAD > 2bd34edb64. I can reproduce it using the provided steps in Emacs-26, but > not in Emacs-27. > > Unless there is a reason to suspect something weird underneath, the > issue should be considered with rather low priority. Anyway, I have > added trailing newline to generated content and mostly use org-capture > with org-protocol for communication between applications. Thanks for the extra info! I managed to reproduce using Emacs 26 and it is a real problem with some edge case in org-indent. The problem is masked by combine-after-change-calls that is used since Emacs 27 but replaced by a placeholer in Emacs 26. The fix is attached. Let me know if it also works on your side. Best, Ihor