Comment #325
Kaushal Modi wrote
the following reply to
https://scripter.co/splitting-an-org-block-into-two/:
@Cumol
> Have a look at the function `scimax-split-src-block` from John Kitchin
I was not aware of that function. I looked it up, and from [its source](https://github.com/jkitchin/scimax/blob/55a63f6f41cc5c1658210e4bec547612aa948b16/scimax-ob.el#L64-L66), it looks like it supports only the Org Src blocks.
As I noted [above](https://scripter.co/splitting-an-org-block-into-two/#action-plan), I needed a function to split **any** Org block; Src blocks is one of them. For example, I find myself splitting `#+begin_example .. #+end_example` blocks a lot too.
*Also it might be interesting to see how this function differentiates from the `org-babel-demarcate-block` function that @Mankoff mentions in his comment.*
> Best wishes and thanks for the post!
Thanks, and welcome! :)
---
@Mankoff
> What about C-c C-v C-d?
I did not know about `org-babel-demarcate-block` before this!
Though, after going through its doc-string and [source](https://code.orgmode.org/bzg/org-mode/src/80d334085fa4c8811c2d4b08c5b54baebff9c50f/lisp/ob-core.el#L1868-L1926), I am thankful that all the exercise in this post did not go to waste :)
`org-babel-demarcate-block` also deals only with Org Src blocks, and I needed a function that splits any Org block as I note [above](https://scripter.co/splitting-an-org-block-into-two/#action-plan).
I tried it out, and it also behaves a bit differently than how I would like when point is in-between a line. See [my spec](https://scripter.co/splitting-an-org-block-into-two/#org-block-split) about "If the point is anywhere on the line .. Go to the end of the line, and then split the block.".
That said, now that I know how this function, I'll find ways to use this vs the one I define in this post.
Thanks!
Reply to this comment