Export code block names to cweb or noweb?

When writing a literate program in Org mode, export is similar to weaving in earlier literate programming tools such as cweb or noweb. These tools would add the name of the code block to the woven (exported) output. In Org mode, it will look something like this:

Org file:

#+NAME: mycodeblock
#+BEGIN_SRC language
[Source code here]
#+END_SRC

Exported output:

<mycodeblock>=
[Source code here]

I am wondering if there is support in Org mode for exporting code block names in this style. If not, is there any way to at least print the name of the code block as a shortcut of some type?

I saw tips that code block names can be exported, but I could not find the exact syntax.

+4
source share
1

:

;; template used to export the body of code blocks
(setq org-babel-exp-code-template
      ;; (concat "\n=%name=:\n"
              org-babel-exp-code-template)
      ;; )
)

, , NuWeb/NoWeb; . http://lists.gnu.org/archive/html/emacs-orgmode/2009-12/msg00170.html Org ( PDF ).

0

Source: https://habr.com/ru/post/1543497/


All Articles