0

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?

Lee H
  • 5,147
  • 4
  • 19
  • 22

2 Answers2

1

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

Joost Diepenmaat
  • 17,633
  • 3
  • 44
  • 53
0

This is the output of exporting HTML in my Emacs 24.3.1 (Org mode 8.1.1):

#+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

There is no blank space, <<refresh>> is exporting verbatim. That is your version of org-mode?

artscan
  • 2,340
  • 15
  • 26