0
0
Fork 1
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-09-16 02:40:03 +00:00
org-mode/lisp
Gerard Vermeulen c2ea553be8
org-babel-demarcate-block: split using element API
* lisp/ob-babel.el (org-babel-demarcate-block): Modify a copy
of (org-element-at-point) to replace the old source block with 2 or 3
new modified copies by means of `org-element-interpret-data'.  The 1st
source block contains the text from the body of the old block before
point or region, the 2nd block contains the body text after point or
body text within region, and in case of region, the 3rd block contains
the text after region.  The caption and the name are deleted from the
1 or 2 blocks below the upper source block.  Indent all blocks
immediately after insertion.  Use :post-blank to control white lines
between inserted blocks.  Leave point at the last inserted block.
Trying to split when point or region is not within the body of the old
source block raises an user-error.
* lisp/ob-babel (org-get-src-block-info): add the "within blank lines
after a source block" condition to the doc-string to match it with the
doc-string of and a comment in `org-babel-demarcate-block'.
* testing/lisp/test-ob.el (test-ob/demarcate-block-split-duplication)
(test-ob/demarcate-block-split-prefix-point)
(test-ob/demarcate-block-split-prefix-region)
(test-ob/demarcate-block-split-user-errors)
(test-ob/demarcate-block-wrap-point)
(test-ob/demarcate-block-wrap-region): New tests to check test cases
that broke earlier versions of this patch.

Link: https://list.orgmode.org/7e41f9b6e9026a404e256f33371e974c@posteo.net/
2024-03-04 14:48:59 +03:00
..
Makefile
ob-awk.el
ob-C.el
ob-calc.el
ob-clojure.el
ob-comint.el
ob-core.el
ob-css.el
ob-ditaa.el
ob-dot.el
ob-emacs-lisp.el
ob-eshell.el
ob-eval.el
ob-exp.el
ob-forth.el
ob-fortran.el
ob-gnuplot.el
ob-groovy.el
ob-haskell.el
ob-java.el
ob-js.el
ob-julia.el ob-R, ob-julia: Do not force-start session in Org Src buffers 2024-01-28 20:04:31 +01:00
ob-latex.el
ob-lilypond.el
ob-lisp.el
ob-lob.el
ob-lua.el
ob-makefile.el
ob-matlab.el
ob-maxima.el
ob-ocaml.el
ob-octave.el
ob-org.el
ob-perl.el
ob-plantuml.el
ob-processing.el
ob-python.el
ob-R.el
ob-ref.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-ruby.el
ob-sass.el
ob-scheme.el
ob-screen.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
ob-sed.el
ob-shell.el
ob-sql.el
ob-sqlite.el
ob-table.el
ob-tangle.el
ob.el
oc-basic.el
oc-biblatex.el
oc-bibtex.el
oc-csl.el
oc-natbib.el
oc.el
ol-bbdb.el
ol-bibtex.el
ol-docview.el
ol-doi.el
ol-eshell.el
ol-eww.el
ol-gnus.el
ol-info.el
ol-irc.el
ol-man.el
ol-mhe.el
ol-rmail.el
ol-w3m.el
ol.el
org-agenda.el
org-archive.el
org-attach-git.el
org-attach.el
org-capture.el Never pass error message verbatim as the first argument for message'/error' 2024-02-25 13:15:04 +03:00
org-clock.el
org-colview.el
org-compat.el
org-crypt.el
org-ctags.el
org-cycle.el
org-datetree.el
org-duration.el
org-element-ast.el org-element-insert-before: Fix return value when setting plain-text 2024-02-29 11:43:52 +03:00
org-element.el
org-entities.el
org-faces.el
org-feed.el
org-fold-core.el
org-fold.el
org-footnote.el org-footnote-new: Add an option to create new anonymous labels 2024-02-05 15:38:48 +01:00
org-goto.el org-goto-map: Do not treat 0-9 as digital arguments by default 2024-02-24 12:07:55 +03:00
org-habit.el
org-id.el
org-indent.el
org-inlinetask.el
org-keys.el
org-lint.el
org-list.el
org-macro.el
org-macs.el
org-mobile.el
org-mouse.el
org-num.el
org-pcomplete.el
org-persist.el
org-plot.el
org-protocol.el Merge branch 'bugfix' 2024-01-06 16:02:02 -05:00
org-refile.el
org-src.el
org-table.el
org-tempo.el
org-timer.el
org.el
ox-ascii.el
ox-beamer.el
ox-html.el
ox-icalendar.el
ox-koma-letter.el
ox-latex.el
ox-man.el
ox-md.el
ox-odt.el
ox-org.el
ox-publish.el Acknowledge that Nicolas Goaziou is no longer maintaining Org libraries 2024-02-14 13:41:21 +01:00
ox-texinfo.el
ox.el