16

Given the following is intended to generate C++ code:

#+BEGIN_SRC python :exports both :results output code
print "struct Whatever{};"
#+END_SRC

The result is inserted as follows:

#+RESULTS:
#+BEGIN_SRC python
struct Whatever{};
#+END_SRC

Which is clearly not formatted as C++. How could I get it so that org generates the following:

#+RESULTS:
#+BEGIN_SRC c++
struct Whatever{};
#+END_SRC

Thanks

1 Answer 1

18

Figured it out:

#BEGIN_SRC python :exports both :results output code :wrap "SRC c++"
2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.