Hello,
I've been testing out org-babel-examplify-region in my bookshelf file to
mark excerpts from books, but there's an issue I have encountered. If
there is a #+end_example after the currently marked region, once you run
org-babel-examplify-region, it does not create a #+end_example at the
end of the marked region properly unless the last line marked includes
the line end. An example is below:
This is text,
that is marked.
#+begin_example
This is text,
already within an example block
#+end_example
Marking this text:
This is text,
that is marked.
And running org-babel-examplify-region on the marked region results in:
#+begin_example
This is text,
that is marked.#+end_example
#+begin_example
This is text,
already within an example block
#+end_example
Which is not a valid example block. I haven't checked the code itself,
but I can assume from its behavior that it does not create a new line to
place the example block end onto. Behavior for better usability would be
to place it onto a new line if other text is present on the same line as
the marked region end. E.g.
#+begin_example
This is text,
that is marked.
#+end_example
#+begin_example
This is text,
already within an example block
#+end_example
Alternatively, it could also just make an assumption and always place it
onto a new line, but that'd hurt intuitive usability.
Regardless, I think something should be done to fix this, but I'm not
sure if I'm supposed to categorize this as a [BUG] so I've marked the
subject as a [FR] instead.
Regards,
Kristoffer