From: "Charles C. Berry" <ccberry@ucsd.edu>
To: Harry Butterworth <heb1001@gmail.com>
Cc: Marco Wahl <marcowahlsoft@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Tangling include files
Date: Wed, 23 Nov 2016 21:22:08 -0800 [thread overview]
Message-ID: <alpine.OSX.2.20.1611232105100.1592@charles-berrys-macbook.local> (raw)
In-Reply-To: <CAMUwPhxGrcvsqEPDWspCwa6KUapBWRqf51=F+K3L0A1Nsq_5SQ@mail.gmail.com>
On Thu, 24 Nov 2016, Harry Butterworth wrote:
> I tried org-org-export-to-org which puts everything into a single document
> but it strips the :tangle parameters out so a subsequent tangle doesn't
> generate any source code.
>
You might try this. Put this at the *top* of your file:
--8<---------------cut here---------------start------------->8---
#+PROPERTY: header-args :eval never-export
#+NAME: tangle file
#+BEGIN_SRC emacs-lisp :eval yes :exports results
(org-babel-tangle)
#+END_SRC
--8<---------------cut here---------------start------------->8---
Type C-c C-c on the property line to refresh it.
Now export. Type 'y' in reply to the query to eval the `tangle file' src
block and again to the `discard edits' query.
Even exporting to a buffer should be fine. You do not really want the
exported document, you just want to force the inclusions to take place and
then run that src block.
This should work, because `org-export-as' will expand all the include's
before running babel. If the above block runs before any others, then the
:tangle headers will still be in place.
In fact you could create a separate file, place all the above in it and
add one line at the bottom to include the top level org file you want to
tangle from. Then export that.
HTH,
Chuck
next prev parent reply other threads:[~2016-11-24 5:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-23 8:24 Tangling include files Harry Butterworth
2016-11-23 9:47 ` Marco Wahl
2016-11-24 4:00 ` Harry Butterworth
2016-11-24 5:22 ` Charles C. Berry [this message]
2016-11-24 9:00 ` Robert Klein
2016-11-24 17:56 ` Charles C. Berry
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.OSX.2.20.1611232105100.1592@charles-berrys-macbook.local \
--to=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
--cc=heb1001@gmail.com \
--cc=marcowahlsoft@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.