From: Kristoffer <kris.lolzby@gmail.com>
To: emacs-orgmode@gnu.org
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 [thread overview]
Message-ID: <7407cbf5-2507-620c-afb2-bf7f98e6d96d@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1647 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 2333 bytes --]
reply other threads:[~2021-11-22 5:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7407cbf5-2507-620c-afb2-bf7f98e6d96d@gmail.com \
--to=kris.lolzby@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).