From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Bremner Subject: tangling from multiple files Date: Tue, 17 Mar 2020 20:21:19 -0300 Message-ID: <87o8sueff4.fsf@tethera.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:49598) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jELWY-00045T-7B for emacs-orgmode@gnu.org; Tue, 17 Mar 2020 19:21:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jELWX-0002DM-3O for emacs-orgmode@gnu.org; Tue, 17 Mar 2020 19:21:26 -0400 Received: from fethera.tethera.net ([2607:5300:60:c5::1]:34988) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jELWW-0001jA-UU for emacs-orgmode@gnu.org; Tue, 17 Mar 2020 19:21:25 -0400 Received: from remotemail by fethera.tethera.net with local (Exim 4.89) (envelope-from ) id 1jELWT-0002Hu-1D for emacs-orgmode@gnu.org; Tue, 17 Mar 2020 19:21:21 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org 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. For example, here is a.org #+name: x.scm #+begin_src scheme (define x 1) #+end_src #+name: y.scm #+begin_src scheme (define y 2) #+end_src and here is b.org. You can imagine c is similar, but maybe swaps the order of x and y #+begin_src scheme :tangle "b.scm" :noweb strip-export <> <> #+end_src # Local Variables: # eval: (org-babel-lob-ingest "a.org") # End: