On 23.02.2024 14:43, Ihor Radchenko wrote: > gerard.vermeulen@posteo.net writes: > [...] >> >> I rewrote my `org-babel-edit-prep:python' to get rid of user-errors >> but >> then I bumped on the user-error coming from >> `org-src--make-source-overlay'. > > This is strange. `org-src--make-source-overlay' does not use > `org-element' API. I cannot see how you are getting such warnings from > there. I am using since a few days a clone of the mailed `org-babel-edit-prep:python' function (an irrelevant fix for setting point) and it works without glitches. I have no explanation of what happened. I added the caveat: This patch is incompatible with `org-babel-edit-prep:' functions that signal `user-error's. to the commit message and cleaned it up a bit. I also removed the scaffolding from the tests that checks where mark and point are. The tests pass with make test. Patch attached. Regards -- Gerard