Insert#

It is possible to insert a block into a previously defined one.

```{lit} CMake, file:CMakeLists.txt
cmake_minimum_version()
project(foo)

add_executable(App main.cpp)
```

```{lit} CMake, Add deps (insert in {{file:CMakeLists.txt}} after "project(")
add_subdirectory(glfw)
```
cmake_minimum_version()
project(foo)

add_executable(App main.cpp)
add_subdirectory(glfw)
add_subdirectory(webgpu)

Tangled result#

Tangled block 'file:CMakeLists.txt' [from here]

cmake_minimum_version()
project(foo)
add_subdirectory(glfw)
add_subdirectory(webgpu)

add_executable(App main.cpp)
== Registry dump ==
Blocks:
 - file: main.cpp (incremental-demo-p1) [NEW]
 - Define target (incremental-demo-p1) [NEW]
 - file: CMakeLists.txt (incremental-demo-p1) [NEW]
 - Recommended extras (incremental-demo-p1) [NEW]
   | Next: Recommended extras (incremental-demo-p1) [APPEND]
   | Next: Recommended extras (incremental-demo-p1) [APPEND]
 - Define target (incremental-demo-p2) [REPLACE]
   | Prev: Define target (incremental-demo-p1)
 - Base skeleton (Introduction) [NEW]
 - Main content (Introduction) [NEW]
 - file:main.cpp (Introduction) [NEW]
 - A block (versionA) [NEW]
 - Another block (versionA) [NEW]
 - Result block (versionA) [NEW]
 - Result block (versionB) [NEW]
 - A block (versionC) [NEW]
 - Result block (versionC) [NEW]
 - A block (versionD) [APPEND]
   | Prev: A block (versionA)
 - Some foo (grand-parent) [NEW]
 - Some bar (grand-parent) [NEW]
 - Some baz (grand-parent) [NEW]
 - Result (grand-parent) [NEW]
 - Some bar (parent) [NEW]
 - Some foo (child) [REPLACE]
   | Prev: Some foo (grand-parent)
 - Some bar (child) [REPLACE]
   | Prev: Some bar (parent)
 - Some baz (child) [APPEND]
   | Prev: Some baz (grand-parent)
 - file:test.txt (demo/hidden) [NEW]
 - Body (demo/hidden) [NEW]
 - Signature (demo/hidden) [NEW]
 - file:CMakeLists.txt (demo/insert) [NEW]
   | Next: file:CMakeLists.txt (demo/insert) [INSERT]
 - Add deps (demo/insert) [INSERTED]
   | Prev: file:CMakeLists.txt (demo/insert)
   | Next: Add deps (demo/insert) [APPEND]
 - file: src/main.cpp [NEW]
 - Main return [NEW]
 - Includes [NEW]
 - Main content [NEW]
 - file: CMakeLists.txt [NEW]
 - Source files [NEW]
 - Add x and y into z [NEW]
 - Main body [NEW]
 - file: src/main2.cpp [NEW]

Hierarchy:
 - incremental-demo-p2
   | Parent: incremental-demo-p1 [exists: False]
   | Fetch files: []
 - versionB
   | Parent: versionA [exists: False]
   | Fetch files: []
 - versionC
   | Parent: versionA [exists: False]
   | Fetch files: []
 - versionD
   | Parent: versionA [exists: False]
   | Fetch files: []
 - parent
   | Parent: grand-parent [exists: False]
   | Fetch files: []
 - child
   | Parent: parent [exists: True]
   | Fetch files: []

Missing: