From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Tangling with cross-references coming from included files Date: Wed, 29 Mar 2017 16:41:49 +0200 Message-ID: <878tnop2ky.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ctEnO-0001Yp-69 for Emacs-orgmode@gnu.org; Wed, 29 Mar 2017 10:41:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ctEnK-0004kC-4X for Emacs-orgmode@gnu.org; Wed, 29 Mar 2017 10:41:58 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:54573) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ctEnJ-0004jy-Ut for Emacs-orgmode@gnu.org; Wed, 29 Mar 2017 10:41:54 -0400 In-Reply-To: (s.'s message of "Tue, 28 Mar 2017 09:20:48 +0200") 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.org@gnu.org Sender: "Emacs-orgmode" To: "s@1042.ch" Cc: Emacs-orgmode@gnu.org Hello, "s@1042.ch" writes: > I am trying to achieve the tangling of an org-file which is composed by > multiple (included) org-files. > > I am using Emacs 25.1.1 and Org mode 9.0.5. > > Here an example of what I am trying to achieve. > > =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94Example starts here= =E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94=E2=80=94 > =3D=3D=3D=3D File A.org =3D=3D=3D=3D > > [Text here =E2=80=A6] > > #+BEGIN_SRC python :tangle src/a.py :noweb tangle > class Foo(object): > <> > #+END > > [More text here ...] > > #+INCLUDE: ./b.org" > > =3D=3D=3D=3D File b.org =3D=3D=3D=3D > > [Text &] > > #+BEGIN_SRC python :exports none > def foo(self): > print(bar) > #+END > =14=14=14Example ends here=14=14=14 > > My problem is, that the included parts are not being tangled. When > having all the parts in one file, there is no problem at all, but having = only file is not an option. > > An easy approach would be, as I thought at first, to use "org-org-export-= as-org", which does include all into one buffer. > Then one could simply tangle that buffer. The problem with that approach = is however, that all arguments > get stripped from #+BEGIN_SRC and therefore :tangle & too. Would calling (org-export-expand-include-keyword) in the master document solve your issue? Regards, --=20 Nicolas Goaziou