emacsorg-babelnoweb

Ignoring noweb syntax in html export


I have an org doc that contains:

#+BEGIN_SRC org
  ,#+BEGIN_SRC sh
  curl -XPOST 'localhost:9200/thing/doc/1' -d'{"body": "foo"}'
  curl -XPOST 'localhost:9200/thing/doc/2' -d'{"body": "bar"}'
  <<refresh>>
  ,#+END_SRC
#+END_SRC

And I'd like to actually ignore the <<refresh>> so it exports correctly as the actual text <<refresh>> when I export HTML (this is for an article demonstrating org-babel and noweb). Instead, it's exporting as a blank space, how can I get it to export verbatim?


Solution

  • If you want noweb syntax disabled for exporting, but enabled for tangling you can use :noweb no-export

    #+BEGIN_SRC org :noweb no-export
      ,#+BEGIN_SRC sh
      curl -XPOST 'localhost:9200/thing/doc/1' -d'{"body": "foo"}'
      curl -XPOST 'localhost:9200/thing/doc/2' -d'{"body": "bar"}'
      <<refresh>>
      ,#+END_SRC
    #+END_SRC
    

    See http://orgmode.org/manual/noweb.html#noweb