> On Mar 18, 2020, at 6:29 PM, David Bremner <da...@tethera.net> wrote: > > "Berry, Charles" <ccbe...@health.ucsd.edu> writes: > >>> On Mar 17, 2020, at 4:21 PM, David Bremner <da...@tethera.net> wrote: >>> >>> >>> I've seen this question around e.g. stack overflow, but none of the >>> answers I found seems really satisfactory. >>> >>> I'd like to share a set of begin_src / end_src blocks in a.org between >>> b.org and c.org; in particular b.org and c.org contain noweb references >>> to names defined in a.org. Is there a better way than using >>> (org-babel-lob-ingest "a.org")? This seems a bit clunky, requiring >>> manual action every time a.org changes. >>> >> >> >> Put >> >> #+include: ./a./org >> >> directives in b.org and c.org >> >> You might want to put the directives inside a non-exported drawer. See >> `org-export-with-drawers’ docstring. > > This works fine (modulo the extra /) for exporting, but doesn't seem to > work for tangling. Does it work for tangling for you; i.e. is b.scm > produced with the two defines in it? >
Right. It does not work directly for tangling. So also use #+export_file_name: b2.org (say) Then load ox-ob.el, export as C-c C-e O o (org-org-export-to-org), visit b2.org and tangle from there. HTH, Chuck