I want to have: - a source code block fontified on export - but not executed - and used as input for another source code block.
I can have it fontified in org-mode and not exported if I use a begin_example
block. But can I let it be fontified on export (to html or latex) es well? Or, vice versa, can I suppress a begin_src
from being executed?
What I have so far is this:
#+name: uninterpreted_sh
#+header: :exports code
#+begin_src sh
echo "Direct"
#+end_src
#+name: uninterpreted
#+begin_example sh
echo "Direct"
#+end_example
#+header: :exports both
#+header: :results output
#+begin_src sh :stdin uninterpreted
VALUE=$(cat)
echo "I got: $VALUE"
#+end_src
#+RESULTS:
: I got: echo "Direct"
There I can get uninterpreted_sh
fontified and can use uninterpreted
as stdin.
A last resort might be to supress the begin_example
from beeing exported altogether?
Note: ther results
I get from the last source block is exactly what I want.
:exports code
argument. They are evaluated when you pass them as the argument to:stdin
. If you change yourbegin_example
block to abegin_src
block, doesn't that give you what you want?echo "Direct"
writingDriect
to stdout which then is used as result and as stdin for the next block. But I want the whole source block as is to be put as input.: I got: echo "Direct"
, and not: I got: Direct
.