From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: tangle on export Date: Thu, 24 Sep 2015 07:51:53 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=089e013d0f9a7a603e05207cdb99 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf54B-0005QR-0r for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 07:52:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zf546-0007g9-N6 for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 07:51:58 -0400 Received: from mail-wi0-x234.google.com ([2a00:1450:400c:c05::234]:35766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zf546-0007fx-HQ for emacs-orgmode@gnu.org; Thu, 24 Sep 2015 07:51:54 -0400 Received: by wicge5 with SMTP id ge5so248247209wic.0 for ; Thu, 24 Sep 2015 04:51:53 -0700 (PDT) In-Reply-To: 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Alan Schmitt Cc: emacs-orgmode --089e013d0f9a7a603e05207cdb99 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I would add a third Elisp block that calls org-babel-tangle. Assuming all your code blocks execute on export that will make it tangle. Or I have also made an Elisp block that does the tangle and then runs the export command. I.e. Not using the keyboard shortcuts for export. On Thursday, September 24, 2015, Alan Schmitt < alan.schmitt@polytechnique.org> wrote: > Hello, > > I have a question I feel is very basic but I did not find the answer in > the manual. How can I trigger the tangling of a block upon export. > > More precisely, I want to give the following example in a lecture: > > #+name:hello > #+begin_src ocaml :tangle myprog.ml > Printf.printf "Bonjour le monde !\n" > #+end_src > > #+BEGIN_SRC sh :exports both :results verbatim > ocamlc -o myprog myprog.ml > ./myprog > #+END_SRC > > where I show a program to be compiled and actually compile it. Is there > a header I should put on the "hello" block to tangle it when I export > it? > > Thanks, > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > Athmospheric CO=E2=82=82 (Updated September 22, 2015, Mauna Loa Obs.): 39= 7.77 ppm > --=20 John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu --089e013d0f9a7a603e05207cdb99 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I would add a third Elisp=C2=A0block that calls org-babel-tangle. Assuming = all your code blocks execute on export that will make it tangle. Or I have = also made an Elisp block that does the tangle and then runs the export comm= and. I.e. Not using the keyboard shortcuts for export.=C2=A0
On Thursday, September 24, 2015, Alan Schmitt <alan.schmitt@polytechnique.org> wrote= :
Hello,

I have a question I feel is very basic but I did not find the answer in
the manual. How can I trigger the tangling of a block upon export.

More precisely, I want to give the following example in a lecture:

#+name:hello
#+begin_src ocaml :tangle my= prog.ml
Printf.printf "Bonjour le monde !\n"
#+end_src

#+BEGIN_SRC sh :exports both :results verbatim
ocamlc -o myprog myprog.ml
./myprog
#+END_SRC

where I show a program to be compiled and actually compile it. Is there
a header I should put on the "hello" block to tangle it when I ex= port
it?

Thanks,

Alan

--
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO=E2=82=82 (Updated September 22, 2015, Mauna Loa Obs.): 397.= 77 ppm


--

--089e013d0f9a7a603e05207cdb99--