emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Babel CALL no longer produces HTML output
@ 2016-07-23 12:14 Jarmo Hurri
  2016-07-23 12:48 ` Christian Moe
  2016-07-23 16:10 ` Charles C. Berry
  0 siblings, 2 replies; 13+ messages in thread
From: Jarmo Hurri @ 2016-07-23 12:14 UTC (permalink / raw)
  To: emacs-orgmode


Greetings.

The Org example below used to work correctly when exported as HTML until
I pulled a newer version of Org from git. I am first going to include
the example here, and then explain the reasoning behind its structure.

=======================================================================
* Example
  
  This call here produced HTML output when exported as HTML until the
  newer versions of Org. Now it produces no HTML output whatsoever.

  #+CALL: rekursio-pystyviivat[:noweb yes]() :results html
  
  The following code blocks still work as expected.
  
  #+NAME: rekursio-pystyviivat-runko
  #+BEGIN_SRC processing :exports none
    if (viivoja == 0)
    return;

    line (x, 0, x, korkeus);
    piirraPystyviivat (viivoja - 1, x + 10, 0.9 * korkeus);
  #+END_SRC

  #+NAME: rekursio-pystyviivat
  #+BEGIN_SRC processing :exports code :noweb no
    void piirraPystyviivat (int viivoja, float x, float korkeus)
    {
      <<rekursio-pystyviivat-runko>>
    }

    void setup ()
    {
      size (600, 400);
      noLoop ();
    }

    void draw ()
    {
      piirraPystyviivat (50, 10, 350);
    }
  #+END_SRC
=======================================================================

In the example above I am playing with noweb to produce the following
_excellent_ teaching effect:

- the last Babel code block is what a student sees

- the student is supposed to replace
  <<rekursio-pystyviivat-runko>>
  with correct code, in this case the body of a recursive function

- the last block has ":noweb no" so that the missing part is not
  replaced by the correct solution

- in the CALL, however, noweb is set to yes so that noweb replacement is
  done, and the first block produces the correct output (in the case of
  Processing language, this is a picture)

I use this structure quite a bit in my material, which is finished
except for layout formatting. So I am going to be in trouble if I can no
longer get the logic to work in Org.

Jarmo

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-07-25 17:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-23 12:14 Babel CALL no longer produces HTML output Jarmo Hurri
2016-07-23 12:48 ` Christian Moe
2016-07-23 13:03   ` Jarmo Hurri
2016-07-24 17:00     ` Christian Moe
2016-07-23 16:10 ` Charles C. Berry
2016-07-23 16:51   ` Nicolas Goaziou
2016-07-23 22:16     ` Charles C. Berry
2016-07-25  7:08       ` Nicolas Goaziou
2016-07-25  7:48         ` Thomas S. Dye
2016-07-25  8:01           ` Nicolas Goaziou
2016-07-25 15:55             ` Charles C. Berry
2016-07-25 17:27             ` Thomas S. Dye
2016-07-23 16:52   ` Jarmo Hurri

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).