2013-10-30 93 views
0

我有一個包含一個有機DOC:忽略noweb語法

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

而且我想實際上忽略<<refresh>>所以正確導出爲實際文本<<refresh>>當我出口HTML(這是對於展示org-babel和noweb的文章)。相反,它是作爲空白空間輸出的,我怎樣才能得到它逐字輸出?

回答

1

如果你想導出禁用noweb語法,但糾纏你可以使用啓用:noweb沒有出口

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

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

0

這是我的Emacs 24.3.1導出HTML(組織模式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 

沒有空格,<<refresh>>逐字出口。那是你的版本org-mode