emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: "s@1042.ch" <s@1042.ch>
Cc: Emacs-orgmode@gnu.org
Subject: Re: Tangling with cross-references coming from included files
Date: Wed, 29 Mar 2017 16:41:49 +0200	[thread overview]
Message-ID: <878tnop2ky.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <B2BDA194-943D-47A4-A852-697308054F8B@1042.ch> (s.'s message of "Tue, 28 Mar 2017 09:20:48 +0200")

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
> \x14\x14\x14Example ends here\x14\x14\x14
>
> 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

      parent reply	other threads:[~2017-03-29 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-28  7:20 Tangling with cross-references coming from included files s
2017-03-28 14:06 ` Nick Dokos
2017-03-28 15:15   ` Sven Osterwalder
2017-03-29 14:41 ` Nicolas Goaziou [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tnop2ky.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=Emacs-orgmode@gnu.org \
    --cc=s@1042.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).