emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FR] org-babel-examplify-region does not add a newline for the example b


From: Kristoffer
Subject: [FR] org-babel-examplify-region does not add a newline for the example block end
Date: Sat, 20 Nov 2021 20:17:52 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]