I want to tangle a codeblock inside a codeblock and include #+end\_src inside. This will not work in org-mode since it will be recognized as the end of the code block.
#+begin_src :tangle snippets/org-mode/PythonBlock
# -*- mode: snippet -*-
# name: PythonBlock
# key: <p
# --
#+begin_src python :tangle ${2:NameHere}.py :results output
# NOTE, this file is generated from the org file:
# `(file-name-nondirectory (buffer-file-name))`
# Only modify the org file and not this Python file.
$0
#+end_sr${1:c}
#+end_src
The hack above works but I'm wondering if it there are other solutions.
(note: while typing my question I thought about the ${1:c} option and kinda answered my own question. Perhaps there are other solutions? )