I have following Request for Enhancement: Write src-block in separate org-file(s), and when time comes to tangle use all those src-blocks using some sort of reference.
In other words, take a look at following an example: -------------------------------------------------------------------- * This is ~/tmp/1.org~ file: #+name: code_block_in_1_org #+begin_src python :noweb yes import pandas as pd #+end_src -------------------------------------------------------------------- #+INCLUDE: "/tmp/1.org" * This is the ~/tmp/2.org~ file #+caption: Local Code Block #+name: code_block_local #+begin_src python :noweb yes import numpy as np #+end_src #+caption: The Final Code Block #+name: the_final_code_block #+begin_src python :results output :tangle output.py :noweb yes <<code_block_in_1_org>> # referencing from 1.org <<code_block_local>> # referencing from within 2.org #+end_src -------------------------------------------------------------------- The file ~/tmp/1.org~ contain src-block (~code_block_in_1_org~) which is needed in block (~the_final_code_block~) of ~/tmp/2.org~ to tangle: - When ~/tmp/2.org~ exported to PDF via LaTeX, ~the_final_code_block~ does contain part of code from ~code_block_in_1_org~ - When ~/tmp/2.org~ tangled, ~the_final_code_block~ does NOT contain part of code from ~code_block_in_1_org~ For consistency with PDF-export and file(s) management reasons, I feel like it would be neat/cool have this feature to spread src-blocks to different org-files. Please take this RFE with a grain of salt, since I'm not that well skilled/experienced person. And, I'm not even sure this spreading src-blocks all over the places/files will be beneficial to overall literate programming paradigm. Just for my small case, it felt beneficial. Please share your opinions on this, I will be happy hear about it. Best, Garid Zorigoo. Emacs : GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.36, cairo version 1.17.6) of 2023-01-03 Package: Org mode version 9.5.5 (release_9.5.5 @ /usr/share/emacs/28.2/lisp/org/) -- Garid Z.