emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangling with cross-references coming from included files


From: Nicolas Goaziou
Subject: Re: [O] Tangling with cross-references coming from included files
Date: Wed, 29 Mar 2017 16:41:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Hello,

"address@hidden" <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]