dalanicolai <dalanico...@gmail.com> writes: > [9.5.4 (release_9.5.4 @ /usr/local/share/emacs/29.0.50/lisp/org/)] > > When trying to create a new src-block via `M-x > org-babel-demarcate-block` immediately after a previous code block (only > empty lines in between), then the command behaves like when splitting a > src-block (inserting an #+end_src first, followed by a #+begin_src). > > However, as the point is outside of the source block, according to the > docstring of the command, a new source block should be created. > > As a comment, normally when creating a new source block, Emacs prompts > for the source block type. However, currently, when used as mentioned > here, the command automatically sets the type (because it tries to > split). I would say that is convenient behavior, so that effectively > only the order of the inserted lines should get reversed.
Thanks for reporting! Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=cd835dcad87bc5b3855832449188dd007fce115c -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>