Hello,

"s...@1042.ch" <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.
>
> ——————Example starts here——————
> ==== File A.org ====
>
> [Text here …]
>
> #+BEGIN_SRC python :tangle src/a.py :noweb tangle
> class Foo(object):
>     <<file-b-method-foo>>
> #+END
>
> [More text here ...]
>
> #+INCLUDE: ./b.org"
>
> ==== File b.org ====
>
> [Text &]
>
> #+BEGIN_SRC python :exports none
> def foo(self):
>     print(bar)
> #+END
> Example ends here
>
> 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,

-- 
Nicolas Goaziou

Reply via email to